---
title: "rotation3DEffect(_:anchor:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/visualeffect/rotation3deffect(_:anchor:)"
---

# rotation3DEffect(_:anchor:)

Rotates content by the specified 3D rotation value.

## Declaration

```swift
func rotation3DEffect(_ rotation: Rotation3D, anchor: UnitPoint3D = .center) -> some VisualEffect

```

## Parameters

- `rotation`: A rotation to apply to the content.
- `anchor`: The unit point within the content about which to perform the rotation. The default value is doc://com.apple.SwiftUI/documentation/SwiftUI/UnitPoint3D/center.

## Return Value

Return Value A rotation effect.

## Discussion

Discussion This effect causes the content to appear rotated, but doesn’t change the content’s frame. The following code applies a rotation of 45° about the y-axis, using the default anchor point at the center of the content: Model3D(named: "robot")     .visualEffect { content, geometryProxy in         content             .rotation3DEffect(Rotation3D(angle: .degrees(45), axis: .y))     } During an animation, this modifier uses spherical linear interpolation, which produces more natural animations, but doesn’t support rotations over 360 degrees. To specify angles over 360 degrees, consider using View/rotation3DEffect(_:axis:anchor:)-4enag.

## See Also

### Rotating

- [rotationEffect(_:anchor:)](swiftui/visualeffect/rotationeffect(_:anchor:).md)
- [rotation3DEffect(_:axis:anchor:anchorZ:perspective:)](swiftui/visualeffect/rotation3deffect(_:axis:anchor:anchorz:perspective:).md)
- [perspectiveRotationEffect(_:axis:anchor:perspective:)](swiftui/visualeffect/perspectiverotationeffect(_:axis:anchor:perspective:).md)
- [rotation3DEffect(_:axis:anchor:)](swiftui/visualeffect/rotation3deffect(_:axis:anchor:).md)
