- Home /
Question by
Peter B-B · Apr 10, 2010 at 10:32 PM ·
vector3quaternion
Convert vector3 to quaternion
What I'm really looking for is to get from vector3 to euler angles.
I was thinking of converting a vector3 to a quaternion, and then using the eulerAngles method in the quaternion.
I want to be able to tell how many degrees away from Up the iphone's accelerometer is along a single axis.
Thanks
Comment
Best Answer
Answer by Peter G · Apr 10, 2010 at 11:48 PM
I think you want to use Quaternion.LookRotation() to create a rotation facing that Vector then measure the angle of the new quaternion.