Hi,
We have a game that requires a clipped, scrolling window within an otherwise unbounded app (so that we can have hand tracking and visual flourishes outside this virtual window). As a result, we need to solve the following two problems:
- Clipping
- Scrolling
This post focuses on the 2nd: Scrolling. We need to be able to move the Volume Camera around in a performant manner. Sadly, simply moving the volume camera in an otherwise static scene, completely tanks the frame rate.
I have a stand alone example that creates a cube of 10 x 10 x 10 cubes (It appears as though I’m unable to attach a zip), leaves them there sitting idle, but then moves a volume camera up and down. The frame rate for this is about 10FPS on hardware, yet is perfectly smooth if you don’t move the volume camera.
It would appear to me as though when you move a volume camera, it triggers a sync of all game object transforms to the RealityKit layer, suggesting the PolySpatial ↔ RealityKit bridge occurs via world matrices.
Instead, if on the RealityKit side, everything was parented to the volume camera, you would get camera movement for free by syncing only a single transform. I have created a standalone RealityKit version of the same demo in Swift, and that runs fine.
Please note this is critical behaviour required for our game, which requires a scrolling, moving camera into a larger world.
I’d be happy to share the example if you can recommend the best way. We’ll also submit a bug report.
Thanks in advance,
-Jack.
Also note that it would appear as though even if we were to get support for Portals, we’d still need Volume Cameras to be optimized.