[ODE] Resetting/Zeroing/Clearing an object?
Pål- Arve Nilsen
conn at smsc.no
Sun Aug 6 23:39:18 MST 2006
Anna-Beth Fox wrote:
> I would like to reset a sphere created using ODE. So I used the
> following snippet:
>
> dMatrix3 r;
> dRSetIdentity(r);
> dGeomSetRotation(the_ball.geom, r);
> dGeomSetPosition(the_ball.geom, 0.0f, 0.5f, 40.0f);
> dBodySetLinearVel(the_ball.body, 0.0f, 0.0f, 0.0f);
> dBodySetForce(the_ball.body, 0.0f, 0.0f, 0.0f);
> dBodySetTorque(the_ball.body, 0.0f, 0.0f, 0.0f);
>
Have u tried to reset the angular and linear velocity?
dBodySetAngularVel( the_ball, 0.0, 0.0, 0.0 );
dBodySetLinearVel( the_ball, 0.0, 0.0, 0.0 );
More information about the ODE
mailing list