From: Daniel D. <du...@ya...> - 2002-12-14 02:21:58
|
On Fri, 13 Dec 2002, Mark Rawls wrote: -->When I have tried to add torque to an object (to rotate it), it kept -->spinning (as I would expect given what I understand of physics). However, -->I couldn't get it to stop, no matter what. I tried to set torque to the -->opposite of current torque, used differing combinations of AddTorque and -->AddRelTorque, but it didn't *stop completely.* At times it would move very -->slowly and I got the impression that it was just an unavoidable floating -->point and/or integrator inaccuracy problem. Is this right? How do I "fix" -->it? Or is it okay to call SetOrientation just once, as in initilization; -->or does this effect stability for the entire duration? That's one of those cases its probably easier to set the velocity. SetAngularVelocity (csVector3 (0,0,0); ODE has extra functionality to correct for errors in order to maintain stability. It makes some assumptions about the motion of the object. So its probable that even though you exactly counteract the force on the object, the error-smoothing term will actually over or under correct you away from zero. It would be better from an engine standpoint however to add some viscosity factor, since ODE doesn't solve rotational friction. Keep in mind though that normally with joints and non-round bodies it would come to rest at some point after collisions and the like. I'll put it on my list to add dampeners of some kind to the body interface. -->Also, I just noticed the AddForceAtPos. Is this another way to go about -->having torque applied to a body? Does it suffer from the same problem I -->think AddTorque has? Yes it does. AddForceAtPos will probably act like AddTorque unless you add exactly at the center of gravity for the object. -- ------------ email: du...@to... www: http://paradox.tosos.com/~duhprey icq: 129354442 She's got a whole brood of kids, like Sendmail, and Postfix, and Apache, and Perl. And some of 'em die young, and some are mentally retarded. Sterling The European finds intercourse with Americans easy and agreeable. Einstein Not a shred of evidence exists in favor of the idea that life is serious. Gill |