[ODE] Resetting/Zeroing/Clearing an object?

Hampus hampus at sxp.se
Mon Aug 7 00:59:26 MST 2006


Hi Anna-Beth,

dBodySetAngularVel is missing

Cheers,
hampa
http://www.toribash.com

7 aug 2006 kl. 12.55 skrev Anna-Beth Fox:

> 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);
>
> Both the geom and body were created using ODE.
>
> After I lunch my ball I would like to reset it so that it is  
> returned to it's orginal position (at 0,0.5, 0) and has NO spin!!!  
> Currently, when I reset my ball using the above code, the ball  
> still "spins" (has continuous rotation).
>
> What am I not clearing to stop the continuous rotation?
>
> TIA,
>
> Anna-Beth
> Send instant messages to your online friends http:// 
> au.messenger.yahoo.com
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list