- Home /
AddTorque is spinning faster in one direction than the other..
hi,
AddTorque is spinning faster in one direction than the other. I only add torque on the y axes and I change between a positive value and negative value, depending on which angle is closer, but it seems that the negative direction spins much faster.
positive: (slow)
rigidbody.AddRelativeTorque( new Vector3( 0, 40, 0 ) * speed);
negative: (super fast)
rigidbody.AddRelativeTorque( new Vector3( 0, -40, 0 ) * speed);
Any ideas??
Likely a problem somewhere else: is this being done per-frame, and it just happens to use -40 for more frames in a row than +40?
I'd do a clean test where $$anonymous$$eyDown kills the old spin (angularVelocity=Vector3.zero) and runs a single AddTorque. See if it really is the physics engine the funny speeds.
I am zeroing out completely with freezeconstraints on the y. I think I found my problem though. This was just an example, but I was actually using the eulerAngles vector3 of a target object as my target rotation!!! I was too tired to realize it, but since the the eulerAngles vector3 is sometimes 0,1,0, I wasn't applying any force.
Answer by highpockets · Feb 06, 2014 at 06:36 PM
My problem is solved
Hi, just encountered the exact same issue. Do you still know how you solved it?
Thanks a lot.
Your answer
Follow this Question
Related Questions
AddRelativeTorque results in incorrect angular acceleration (Maybe centrifugal force affects) 0 Answers
Using Torque to kill Angular Velocity 2 Answers
Rigidbodies get huge amount of velocity when clipping into other Rigidbodies 2 Answers
OnCollisionEnter isn't working between two RigidBodies 1 Answer
Rotating a Rigidbody with Physics 1 Answer