How can I calculate a multi-axis SCNVector4 rotation for a SCNNode?

后端 未结 4 461
栀梦
栀梦 2021-01-14 10:18

The SCNNode take a rotation using a SCNVector4, which has an angle (w) and a magnitude how that angle applies to each axis (x, y, z). For example, to rotate 45

4条回答
  •  无人及你
    2021-01-14 10:45

    Do you ask for rotation matrix or how to simply rotate in general? If the second is correct then for example:

    [node runAction:[SCNAction rotateByX:0 y:M_PI z:0 duration:0]];
    

提交回复
热议问题