详细解释 ScnVector4 方法 [英] Explaining in Detail the ScnVector4 method
问题描述
我长期使用 3ds max,我知道 xyz 轴.我在 xcode 中看到的 scnnode 是 scnvector4 的 w 组件.
I am using 3ds max for a long time and I know xyz axis. what I see in xcode in rotation the scnnode what made my mind blowed up is w component of scnvector4.
有人可以详细解释如何使用这种方法,因为我搜索了很多时间,但我无法让我的对象按照我的意愿旋转.任何人都可以帮助他旋转 180 度,但如果有人为进一步旋转解释更多,我将不胜感激,我知道我看到了这个链接,但我不明白.
Can someone explain in detail how to use this method because I searched a lot of time but I can't make my object spin as I desire. anyone can help to make him spin to his back in 180 degree but I will appreciate if someone explain more for further rotations, Knowing that I saw this link but I didn't understand something.
http://www.cprogramming.com/tutorial/3d/rotationMatrices.html
推荐答案
我相信您正在尝试旋转节点(rotation
属性).
I believe that your are trying to rotate nodes (rotation
property).
来自文档:
四分量旋转矢量在前三个分量中指定旋转轴的方向,在第四个分量中指定旋转角度(以弧度为单位).
The four-component rotation vector specifies the direction of the rotation axis in the first three components and the angle of rotation (in radians) in the fourth.
您可能会发现使用 eulerAngles
更容易:
You might find it easier to use eulerAngles
:
节点的方向,表示为俯仰角、偏航角和横滚角,均以弧度为单位
The node’s orientation, expressed as pitch, yaw, and roll angles, each in radians
这篇关于详细解释 ScnVector4 方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!