Rotation returns normalized value?

 0 I do a debug.log(transform.rotation.y) and it returns me a value of 0-1. How can I get the real rotation in degrees and not a normalized value? Thanks more ▼ asked May 28 '11 at 10:29 AM Johan 4 427 ● 81 ● 84 ● 97 The rotations are Quaternions (a complex 4-dimentional representation of a rotation):http://en.wikipedia.org/wiki/QuaternionThey have been invented to circumvent problems at certain angle-combinations. The 4 components of a quaternion have nothing to do with angles. Like iggy said you want the eulerAngles of the quaternion. The localEulerAngles are what you see in the inspector. May 28 '11 at 12:12 PM Bunny83 Ironically, the "complex 4-dimentional representation of a rotation" is normalized, so the op was right! :p May 28 '11 at 12:19 PM Joshua @Joshua: sure, but i just explained what you have to expect from the x,y,z,w components. If you don't want to do some lowlevel calculations on them you normally don't need to access the components of a quaternion.The point is eulerAngles represents 3 rotations that are executed in order z,x,y (or reverse depends on local/global) The point is that some angles like x==90 or -90 a the y and z rotation affect the same axis, therefore you have unlimited possibilities to represent the rotation. It's getting worse when you want to do a relative rotation. That's why Quaternions are awesome. You can do relative rotations from an arbitrary rotation to another arbitrary rotation. May 28 '11 at 02:39 PM Bunny83 I know ^.^ I was just jokingly pointing out that they are indeed normalized. Anyway - to the OP: Don't touch them unless you understand them, and don't try to understand them unless you have at least an afternoon to waste. ;) May 28 '11 at 03:28 PM Joshua add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

 0 just type this:debug.log(transform.eulerAngles.y); more ▼ answered May 28 '11 at 10:37 AM iggy 441 ● 2 ● 6 add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

By Email:

Topics:

x1281
x288
x16

asked: May 28 '11 at 10:29 AM

Seen: 1303 times

Last Updated: May 28 '11 at 03:28 PM