<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNAction/rotateTo(x:y:z:duration:usesShortestUnitArc:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNAction(cm)rotateToX:y:z:duration:shortestUnitArc:"
  },
  "title" : "rotateTo(x:y:z:duration:usesShortestUnitArc:)"
}
-->

# rotateTo(x:y:z:duration:usesShortestUnitArc:)

Creates an action that rotates the node to absolute angles in each of the three principal axes.

```
class func rotateTo(x xAngle: CGFloat, y yAngle: CGFloat, z zAngle: CGFloat, duration: TimeInterval, usesShortestUnitArc shortestUnitArc: Bool) -> SCNAction
```

## Parameters

`xAngle`

The amount to rotate the node counterclockwise around the x-axis of its local coordinate space, in radians.

`yAngle`

The amount to rotate the node counterclockwise around the y-axis of its local coordinate space, in radians.

`zAngle`

The amount to rotate the node counterclockwise around the z-axis of its local coordinate space, in radians.

`duration`

The duration, in seconds, of the animation.

`shortestUnitArc`

If <doc://com.apple.documentation/documentation/Swift/false> (the default), the animation interpolates each component of the node’s rotation between its current value and the new value. If <doc://com.apple.documentation/documentation/Swift/true>, the animation makes the most direct rotation possible from the node’s current orientation to the new orientation.

## Return Value

A new action object.

## Discussion

When the action executes, the node’s [`rotation`](/documentation/SceneKit/SCNNode/rotation) property animates to the new angle.

This action is not reversible; the reverse of this action has the same duration but does not change anything.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)