Is it possible to programmatically alter the size of a volume on Vision Pro?
Asked on 07/30/2024
1 search
Yes, it is possible to programmatically alter the size of a volume on Vision Pro. This can be done by driving the size of your volume in code as your app updates its content. Changes to the frames of your views inform the volume about its size, allowing it to resize smoothly. You can add a state variable for the scale and update the frame values of your view, which will automatically resize the volume to fit the new size.
For more details, you can refer to the session Dive deep into volumes and immersive spaces (05:26).

Dive deep into volumes and immersive spaces
Discover powerful new ways to customize volumes and immersive spaces in visionOS. Learn to fine-tune how volumes resize and respond to people moving around them. Make volumes and immersive spaces interact through the power of coordinate conversions. Find out how to make your app react when people adjust immersion with the Digital Crown, and use a surrounding effect to dynamically customize the passthrough tint in your immersive space experience.

Platforms State of the Union
Discover the newest advancements on Apple platforms.