PolySpatial: VolumeCamera is unacceptably slow


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,


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.

Thanks Jack! Hopefully you’ve already submitted a reproducible sample project together with the bug report. We’ll be able to take it from there!

I have, yes. It’s IN-59921. I don’t know how to submit a sample project other than reporting the bug in the Bug Reporter tool, and it uploading whatever it uploads. Do you have a recommended way for me to supply sample projects as a zip?

The slowness of moving a volume camera around is definitely a bug on our side, luckily it will have an easy fix. We’ll try to get it in for the next version (post 0.6).

A fix for this was merged and should be in the 0.6.3 release.


Thank you very much! I’ll take a look at it in my stand alone demo and report back with the results.

0.6.3 hasn’t been released yet :slight_smile: But will be soon!