Rotate a vector relative to itself

Posted by Paul Manta on Game Development See other posts from Game Development or by Paul Manta
Published on 2012-06-20T21:19:38Z Indexed on 2012/06/20 21:26 UTC
Read the original article Hit count: 226

Filed under:
|
|

I have a plane defined by transform.forward and transform.right, with 0 degrees corresponding to the forward vector and positive 90 degrees to the right vector.

How can I create a third vector rotated in this plane. A rotation of 0 degrees would mean the vector is identical to transform.forward, a rotation of 30 degrees would mean it forms a 30 degree angle with the forward vector.

In other words, I want to rotate the forward vector relative to itself, in the plane it defines with the right vector.

© Game Development or respective owner

Related posts about unity

Related posts about vector