---
title: "rotate(toAxisAngle:duration:)"
framework: scenekit
role: symbol
role_heading: Type Method
path: "scenekit/scnaction/rotate(toaxisangle:duration:)"
---

# rotate(toAxisAngle:duration:)

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

## Declaration

```swift
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

Return Value A new action object.

## Discussion

Discussion When the action executes, the node’s 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.

## See Also

### Creating Actions That Rotate a Node

- [rotateBy(x:y:z:duration:)](scenekit/scnaction/rotateby(x:y:z:duration:).md)
- [rotateTo(x:y:z:duration:)](scenekit/scnaction/rotateto(x:y:z:duration:).md)
- [rotateTo(x:y:z:duration:usesShortestUnitArc:)](scenekit/scnaction/rotateto(x:y:z:duration:usesshortestunitarc:).md)
- [rotate(by:around:duration:)](scenekit/scnaction/rotate(by:around:duration:).md)
