Get Vector3 from Quaternion / Rotate Vector3

September 13, 2011 by

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,;

This also effectively rotates the forward-vector with the rotation of the transform, positioning it relative to the rotation of the actual object.

Categorised in: , ,

Leave a Reply

Your email address will not be published.