Notifications
Clear all

[Closed] radtodeg acting weird

Hey, so lets say I have an object that’s rotated 30 degrees in Z. I run this code…

$.rotation.z_rotation

And I get 30.0

Now I run

$.rotation.z

I get the result in radians. So I run

radtodeg $.rotation.z

And the result is 14.8292

Why does (radtodeg $.rotation.z) and ($.rotation.z_rotation) give two different values?

  • Neil
2 Replies
 PEN

I think that rotation.z is the z part of the quat not the euler angle.

That’s it. Thanks PEN, talk about a bad form of notation. rotation.w is the fourth part of the quat, and x y and z refer to positions 1 2 and 3 and not the actual angle. Very confusing. Anyways, thanks I can now fix my code

  • Neil