- Home /
Question by
sirconnorstack · Jan 19, 2014 at 11:11 PM ·
2drotationquaternionmath
How do I rotate a vector2d
Say I have a vector2d, like Vector2d.up, and I want to rotate it 30 degrees counter clockwise. Do I have to do it with Quaternions? Is there a simpler way?
Comment
Best Answer
Answer by robertbu · Jan 19, 2014 at 11:20 PM
I'd do it with Quaternions:
var newDir : Vector2D = Quaternion.AngleAxis(30.0, Vector3.forward) * Vector2D.up;
Your answer