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

# defaultWorldScaling(_:)

Specify the world scaling behavior for the window.

```
nonisolated func defaultWorldScaling(_ scaling: WorldScalingBehavior) -> some Scene
```

## Discussion

By default, regular windows increase their physical size as they move
further away, ensuring they remain at the same angular size. This
preserves legibility and ease of use for text and controls. Volumes
render with a fixed physical size, because they are most commonly used
for 3D content which is meant to behave with greater physical accuracy.

This modifier overrides the physical scaling behavior for volumes, so
they scale like windows while still maintaining other volumetric
behaviors.

This modifier has no effect on immersive spaces or windows without a
window style of [`volumetric`](/documentation/SwiftUI/WindowStyle/volumetric).

```
@main
struct SampleApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        .windowStyle(.volumetric)
        .defaultWorldScaling(.dynamic)
    }
}
```

For further information, see
<doc://com.apple.documentation/design/Human-Interface-Guidelines/spatial-layout>
in the Human Interface Guidelines.

---

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)