The node’s orientation, expressed as a rotation angle about an axis. Animatable.
SDKs
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Scene
Kit
Declaration
var rotation: SCNVector4 { get set }
Discussion
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. The default rotation is the zero vector, specifying no rotation. Rotation is applied relative to the node’s pivot
property.
The rotation
, euler
, and orientation
properties all affect the rotational aspect of the node’s transform
property. Any change to one of these properties is reflected in the others.
You can animate changes to this property’s value. See Animating SceneKit Content.