当前位置:网站首页>Rotation order and universal lock of unity panel

Rotation order and universal lock of unity panel

2022-07-01 17:35:00 ZEKEGU1997

Every unity Objects have one on the panel rotation value , So how do you get the value of this rotation ?

Suppose an object xyz Of rotation Values are not zero , We will find this by pulling the value on the panel , pull y Value is the value of the object around the world coordinate y The axis rotates in the vertical direction , pull z The axis of an object along its own coordinates z Shaft rotation , pull x The axis is difficult to see the rotating axis .

If the rotationZ Value to 0, Pull again x, Find the object around its own coordinates x Shaft rotation

  The moving picture comes from (7 Bar message ) unity Rotating Euler angle Omnidirectional lock explain _fengya1 The column -CSDN Blog _unity Omnidirectional lock

For this phenomenon , We can think of it this way ,unity Get a rotating object , It's from (0,0,0) Start , Go around first y Shaft rotation , And then there was x Axis , And finally z Axis .


What is the phenomenon of universal lock ? It refers to pitch value , namely unity In the panel rotationX by 90 degree , Rotation will lose a degree of freedom .

Set up rotationX by 90 degree , Pull again y and z, You will find that their rotation axes coincide , In this way, it can no longer rotate freely . Increase Euler angle by code x, You will also find arrival 90 Time cannot be increased .

This problem can be prevented by substituting quaternions for Euler angles .

原网站

版权声明
本文为[ZEKEGU1997]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202152332354322.html