Orienting and Object to face its Velocity

What is the easiest way to orient an object to face its velocity vector? If I have a rocket, and a force is fairly frequently changing it’s direction, how do I orient the direction of the rocket to face this vector?

I tried this:

transform.rotation = Quaternion.LookRotation(-rigidbody.velocity);

But it just kind of freaked out at me. Any suggestions?

Well doing that would be easy, but it’s more intuitive to actually rotate your rocket and have the velocity vector move with it.

Like rigidbody.velocity = transform.TransformDirection(0,0,speed);

then to make the rocket turn, transform.Rotate();

^That’s all assuming you’re new and wondering how the difference between global and local coordinates

But in the occasion that you need the system to work the way you have it try,

Quaternion.Euler(rigidbody.velocity);

if you have ANY questions at all. Please DON’T hesitate to PM me on the forums. Hope this helps, Good luck mate!