---
title: "localRotate(by:)"
framework: scenekit
role: symbol
role_heading: Instance Method
path: "scenekit/scnnode/localrotate(by:)"
---

# localRotate(by:)

Changes the node’s orientation relative to its current orientation.

## Declaration

```swift
func localRotate(by rotation: SCNQuaternion)
```

## Parameters

- `rotation`: The axis and angle of rotation to apply, in node-local space, expressed as a quaternion.

## Discussion

Discussion This method rotates the node according to its pivot transform. The effects of this method are animatable; that is, calling this method during an implicit-animation transaction animates the rotation effect. (See Animating SceneKit Content.)

## See Also

### Related Documentation

- [simdLocalRotate(by:)](scenekit/scnnode/simdlocalrotate(by:).md)

### Performing Node-Relative Operations (SceneKit Types)

- [rotate(by:aroundTarget:)](scenekit/scnnode/rotate(by:aroundtarget:).md)
- [localTranslate(by:)](scenekit/scnnode/localtranslate(by:).md)
- [look(at:)](scenekit/scnnode/look(at:).md)
- [look(at:up:localFront:)](scenekit/scnnode/look(at:up:localfront:).md)
