UE4坐标系坐标轴旋转轴

发表于2018-01-25
评论2 1.34w浏览
本篇文章给大家介绍下虚幻引擎中的坐标系知识,让大家知道什么是坐标轴和旋转轴。

1.UE4的X轴是前方。

2. UE4和unity都是左手坐标系。
判断方法:四指由X卷向Y,看大拇指的朝向和Z轴朝向,由此判断使用的是左手坐标系还是右手坐标系。

3. UE4中,Rotation的X是翻滚角Roll,围绕X轴旋转。Y是俯仰角pitch,围绕Y轴旋转。Z当然是偏航角yaw了,围绕Z轴。
(翻滚)Roll,(俯仰)Pitch,(偏航)Yaw如下(顾名思义很好记):

4. UE4里,蓝图中的rotation的三个依次为roll,pitch,yaw。C++中FRotator里是pitch,yaw,roll。(很蛋疼!)



c++中:
总之不管怎么样,根据三个角的定义来就行。

5.
Get component relative rotation -> get forward vector, that will return the local forward vector OR if you want the world forward vector……Get component world rotation -> get forward vector. The rotation return will be based on the mesh's root x axis no matter which way it is facing.
get forward vector  //获得物体的自身的前方
Get component world rotation -> get forward vector.   //获得根节点X轴的前方

如社区发表内容存在侵权行为,您可以点击这里查看侵权投诉指引

标签:

0个评论