[ODE] cinetic energy, how stop forces apply to a object?

elekis elekis at gmail.com
Fri Feb 2 16:46:18 MST 2007


hi all,

always trying to use ode for a project,
in my principal loop I have that

/***********************************************************************************************
 if(t < old_t){
                        old_t = t;
                        calNorm(Box2,Box1,3);
                        dBodyAddRelForce (Box2, vctNorm[0], vctNorm[1],
vctNorm[2]);

                        calNorm(Box2,Box4,3);
                        dBodyAddRelForce (Box2, vctNorm[0], vctNorm[1],
vctNorm[2]);


                        calNorm(Box2,Box3,3);
                        dBodyAddRelForce (Box2, vctNorm[0], vctNorm[1],
vctNorm[2]);

                        const dReal* tmpforce = dBodyGetForce  (Box2);

                        t =  tmpforce[0] + tmpforce[1] + tmpforce[2];
                        if(t < 0) t *= -1;
                 }else {dBodyDisable( Box2 );}
/*********************************************************************************************************


to be simple , a object (a box) move under force , and when a condition
come  (  if(t < old_t)  )  the object has to stop where he is.
what I don't understand is if I dont put else dBodyDisable( Box2 ), my body
Box2 continue his on his own way  like he has a cinetic enery.

is it normal??

thanks

a++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mooshika.org/pipermail/ode/attachments/20070203/ff844492/attachment.htm


More information about the ODE mailing list