Move a Vector3 up according to its rotation.

As simple as that. How do I take an object and move it "up" taking into account its rotation. So if I had a cylinder at a 45 degree angle it would move up into the air and sideways on a 45 degree line.

1 Answer

1

You can use transform.up instead

Also, a lot of functions let you specify local space movement, e.g:

transform.Translate(Vector3.up, Space.Self);

Wow I need to spend more time looking at the Transform functions. This is perfect. Thanks.