How do you pin a volume to a tabletop?

Asked on 06/12/2025

1 search

To pin a volume to a tabletop in visionOS, you can use the Surface Snapping feature introduced in VisionOS 26. This feature allows you to snap windows and volumes to physical environments by gently moving the window close to a surface. For volumes, you can snap the bottom to horizontal surfaces like a table. This is achieved using the new SurfaceSnapping Info API, which provides information about the snapping state and allows you to anchor the volume horizontally on the table.

For more detailed information on how to implement this, you can refer to the session Set the scene with SwiftUI in visionOS (08:15) where volumetric enhancements, including surface snapping, are discussed.