microsoft / MixedReality-WorldLockingTools-Unity

Unity tools to provide a stable coordinate system anchored to the physical world.
https://microsoft.github.io/MixedReality-WorldLockingTools-Unity/README.html
MIT License
188 stars 45 forks source link

GameObject containing ARSessionOrigin leads to performance problems if Transform not at Origin #287

Closed MaxwellSpectar closed 2 years ago

MaxwellSpectar commented 2 years ago

My team recently experienced an issue where the performance would drop down to less than 30 FPS in less than 5 minutes even if the app was only open and no menus were interacted with. The solution ended up moving the GameObject with ARSessionOrigin to Origin. Surprised there is not an in editor warning regarding this if it can cause such silent and violent performance problems. A warning or message in editor would be appreciated or forcing the GameObject to be at Origin if it has an ARSessionOrigin script attached, whichever would be more appropriate.

MaxwellSpectar commented 2 years ago

Posted in https://github.com/needle-mirror/com.unity.xr.arfoundation as well as I realize this is not WLT specific but if the above issue can be reflected in a WLT set up doc or an editor set up tool that would most likely be helpful to future developers.

fast-slow-still commented 2 years ago

This sounds like a very serious bug in AR Foundation (or one of the XR Plugin providers). I would hope it would get fixed, rather than documented. The whole point of the ARSessionOrigin is to allow a non-identity transform of the scene relative to tracker space. An ARSessionOrigin that has to be at the origin is pointless.

It would be great if you could submit a bug report to Unity giving enough info for them to repro the issue (version, device, setup, ideally a stripped down test scene isolating the issue). I was not able repro the issue with the info you provided.