I am working on a SceneKit project and I would like to rotate an object on three axises (world axis) but once I rotate the object, the next rotation is done relative to the new, rotated axis.
Imagine a cube that you should be able rotate on the absolute x and y and z axises using three buttons relative to the world.
As far as I know there are the following options for SCNAction:
- SCNAction.rotateTo(x: 1.0, y: 0.0, z: 0.0, duration: 0.5, usesShortestUnitArc: true)
- SCNAction.rotateTo(x: 1.0, y: 0.0, z: 0.0, duration: 0.5)
- SCNAction.rotateBy(x: 1.0, y: 0.0, z: 0.0, duration: 0.5)
- SCNAction.rotate(by: 0.0, around: SCNVector3, duration: 0.5)
- SCNAction.rotate(toAxisAngle: SCNVector4, duration: 0.5)
Unfortunately none of these are absolute, all of them rely on the previous rotation.
Do you know any way to implement real absolute world axis rotation?
Thanks for the help in advance!