<!--
{
  "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/rotate(toAxisAngle:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNAction(cm)rotateToAxisAngle:duration:"
  },
  "title" : "rotate(toAxisAngle:duration:)"
}
-->

# rotate(toAxisAngle:duration:)

Creates an action that rotates the node to an absolute angle around a specified axis.

```
class func rotate(toAxisAngle axisAngle: SCNVector4, duration: TimeInterval) -> SCNAction
```

## Parameters

`axisAngle`

A four-component vector whose first three components are a vector in the node’s local coordinate space specifying an axis and whose fourth component is the amount to rotate the node counterclockwise around that axis, in radians.

`duration`

The duration, in seconds, of the animation.

## 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)