<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/rotation3DEffect(_:anchor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE16rotation3DEffect_6anchorQrSo12SPRotation3Da_AA11UnitPoint3DVtF"
  },
  "title" : "rotation3DEffect(_:anchor:)"
}
-->

# rotation3DEffect(_:anchor:)

Rotates the view’s content by the specified 3D rotation value.

```
@export(implementation) nonisolated func rotation3DEffect(_ rotation: Rotation3D, anchor: UnitPoint3D = .center) -> some View
```

## Parameters

`rotation`

A rotation to apply to the view’s content.

`anchor`

The unit point within the view about which to perform
the rotation. The default value is [`center`](/documentation/SwiftUI/UnitPoint3D/center).

## Return Value

A view with rotated content.

## Discussion

This modifier rotates the view’s content without changing the view’s
frame. The following code displays a 3D model with a rotation of
45° about the y-axis using the default anchor point at the center of
the view:

```
Model3D(named: "robot")
    .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`.

---

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)