i think it happens because you pass a string as collision type. the function needs an integer (use the NEWTON_CONVEXHULL define).
it's a bit annoying that lite-c doesn't give more useful error messages in such cases.
Quote:
no, i still dont get Impulse to work
could you give me exapmle?
Code:
void create_sphere()
{
you = ent_create("ball.mdl", vector(100, 100, 200), NULL);
NewtonBody *body = newton_addentity(you, 10, NEWTON_SPHERE, 0);
NewtonAddBodyImpulse(body, vectorf(0, 0, 10), vectorf(you.x * QUANTTOMETER, you.y * QUANTTOMETER, you.z * QUANTTOMETER));
}
void create_sphere_startup()
{
on_p = create_sphere;
}
this works for me. maybe you forgot to add the QUANTTOMETER conversion (i first forgot this when i wrote this example)?
the first vector is the wanted change in velocity, the second vector is the point in global space where the impulse should be applied.