Seamless Bounded to Unbounded Transition in VisionOS 2

Here’s the use case I’ve been asked for in a few prototypes:

  • User starts in Bounded mode, can position volume in space with native UI. Imagine a rocket on a launch pad.
  • User presses launch and app switches to UnBounded mode, other apps fade out and rocket launches around room

I believe this isn’t possible, if I switch the VolumeCamera to an unbounded VolumeCameraWindowConfig the coordinate system switches to the user’s feet and moves all content with it (and I can’t move the content back to where it was as there is no way of getting the transform of the previous bounded camera). First, is this all correct in assuming there is no (even hacky or native) way to have an object seamlessly persist in the same location between bounded and unbounded modes?

Second, I’m wondering if there is a middle ground with VisionOS 2 where it isn’t in shared mode to start, but is in “exclusive” mode. You wouldn’t see other open apps, but I can open the rocket in a volume, have the user move it around with the native controls, then when launched I can use the relative position of the window to swap it with a rocket in an unbounded space. I’m curious being able to access the relative positioning of the volumes would allow me to do this?

from the docs:

In “exclusive” mode, a single application controls the entire view, via an unbounded volume (see below) in addition to previously created bounded volumes. In this mode, an app knows the relative positioning of its volumes, can access all AR features of the device, and use hand/joint position information to drive input and interactions directly. The app still does not have the ability to move or size bounded volumes, and thus must rely on the user to ensure bounded volumes don’t overlap with meaningful content within the unbounded volume.

thanks!!

1 Like

I’m revisiting this prototype and just wanted to give it a bump to check if anything has changed recently. after a quick search I’m guessing there is no way to match transforms of entities in between bounded and unbounded volumes. would appreciate it if anyone can confirm, thanks!

Apple has three coordinate spaces that they deal with and there isn’t a middle ground you have to do the transform operation. And to your point - not sure if this is directly accessible from Unity (that volume location relative) but maybe you could write some sort of wrapper to get that information from VisionOS?
I don’t have an answer for you but this is doable via Swift through RealityKit. Maybe it will help narrow your search down: Apple has a way to do this directly in Swift. I think it’s just a question to see if these RealityKit & SwiftUI calls have connections into Unity. Time in Video: 20:57

This looks more like Reality Kit functionality but that transform operation is what you’re exactly asking about and that video is explaining the exact operation you want to do where in the video it’s some sort of Robot going from a volumetric space to an immersive space. Hope that helps.

1 Like

That video is exactly what I was looking for, thank you! I’ve been through so many WWDC vids but somehow missed that one… I actually have another project I’m converting to native/RealityKit which I can use this on, it should work perfectly. Once I have that sorted I’ll dig into the Unity side and see if there is a way to get the handles of the bounded volumes in Swift and pass the transforms through Unity/C# somehow. I’ve got SwiftUI components → C# interop working well, but haven’t tried much besides sliders/buttons. I feel like there could be some Polyspatial/RealityKit coordinate space magic hiding that would make things difficult or impossible but I’ll try.

1 Like