x


Before updating to Windows 10 you may need to return your Pro license. More information here

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

more ▼

asked Apr 10, 2010 at 10:32 PM

avatar image

Peter B-B
291 37 34 55

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I think you want to use Quaternion.LookRotation() to create a rotation facing that Vector then measure the angle of the new quaternion.

more ▼

answered Apr 10, 2010 at 11:48 PM

avatar image

Peter G
18.7k 35 101 222

I could have sworn I tried that... Thanks!

Apr 11, 2010 at 12:32 AM Peter B-B
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1401
x962

asked: Apr 10, 2010 at 10:32 PM

Seen: 19147 times

Last Updated: Apr 10, 2010 at 10:32 PM