Monthly Archives: September 2011

Get Vector3 from Quaternion / Rotate Vector3

To get the vector from a quaternion rotation you simply multiply the quaternion by the forward vector. Debug.DrawRay(transform.position, transform.rotation * Vector3.forward, Color.red); This also effectively rotates the forward-vector with the rotation of the transform, positioning it relative to the rotation of the actual object.

New category “HowTo”

I’m getting a bit fed up having to look up everything with google when programming. Therefore I’ll add everything I need and find here (even if it isn’t all that extrodinary).