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.
-
Pages
-
Categories
-
Archives
- January 2013
- July 2012
- June 2012
- May 2012
- March 2012
- February 2012
- January 2012
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- January 2011
- February 2010
- January 2010
- October 2009
- April 2009
- March 2009
- November 2008
- August 2008
- June 2008
- May 2008
- February 2008
- January 2008
- November 2007
- October 2007