- Home /
Rocket-styled angular drag
I am building a vehicle that behaves much like a rocket. I'm using AddRelativeForce to propel the rocket forward, and I use AddRelativeTorque in response to the player's WASD input. I set the rigidbody's angular drag value to 2 to avoid it spinning in all eternity and it works great, however. Because of the air flow, a rocket-shaped object would at high speeds rotate to match direction of motion. I attempted this using this formula: transform.rotation = Quaternion.Lerp(transform.rotation,Quaternion.LookRotation(rigidbody.velocity.normalized),rigidbody.velocity.magnitude*0.01f); It works almost as intended. While facing the direction of movement, it also affects the rocket's roll. This effect is good in horizontal flight as it keeps the rocket's right side up, but when flying directly upwards, it'll roll a lot and very unrealistic.
Your answer
Follow this Question
Related Questions
Making ball move on drag 0 Answers
How to slow down a gameobject that has rigidbody 1 Answer
How to let a GameObject generate force but not be affected by certain forces? 0 Answers
Deactivate Rigibodies 1 Answer
Rigidbody climbing stairs 2 Answers