- Home /
What Should i use rigidbody.AddTorque() or Quaternions ?
Hi Guys. i am making famous game KnifetHit prototype. I confused at one thing. In that game the wooden log rotates and you have to hit him without hiting other knifes. But for log rotation which method i can use. Should i use rigidbody.AddTorque() or Quaternions ?
Answer by Bunny83 · Jan 24 at 09:20 AM
Neither. If you want an object that is rotating at a constant speed and still reacts to physics, you simply set the angularVelocity of the object manually to the desired speed. AddTorque would add a torque each frame, so the speed would increase until the object hits equilibrium between being accelerated and being slowed down due to angular drag. Or if you have set the angular drag to 0 it would speed up until you hit the max angular velocity.
So the best solution is to set the angular drag to 0 and just set the angularVelocity to your desired speed.