Question by
wouter_vandenputte · Aug 11, 2017 at 08:41 PM ·
rotationeulerangleseulereuler angles
Why does this quaternion euler not compute?
I want to rotate my 3D model in only one axis and altough the math seemed correctly, It kept going to 0,0,0. I started debugging and noticed something strange. The computation of a quaternion always give an unspecified error.
As you can see, Vector3.zero computes, the new Vector3(0,0,0) doesn't.
Nor does the one I want being
transform.rotation = Quaternion.Euler(transform.rotation.x, transform.rotation.y, 0);
where transform.rotation.x = 0 and transform.rotation.y = 90
quaternion.png
(9.8 kB)
Comment
This is pretty fishy. I wasn't able to reproduce anything of this.
Have you tried reproducing the error in an empty project?