We recently upgraded our project to Unity 5.6.4p2 from 5.6.1f1. We're noticing now when we toggle VRSettings.enabled from false to true the positional tracking gets really jumpy. Everything else in the scene is running at frame rate. Hands rendering from the avatar sdk, scene elements, etc. are all fine. But the tracking jumps around a lot at like 5 FPS.
Tried in an empty scene as well and we can reproduce.
We're not getting any errors so not sure what the source of this is. We've tried with Utils 1.24 and 1.26 and both behave the same way.
Update: we've actually narrowed it down to it not being unity but being a bug introduced by the Oculus Utils. We were previously on Unity utils 1.13 and 1.24 introduces the bug when toggling VR on/off.
Looks like the source of the bug is the OVRPlugin.dll. If we revert back to OVRPlugin v 1.14 everything works fine, but 1.24 and up has this bug. You can see the Rift tracking is working just fine, but something interfacing with Unity is really choppy.
Hey @sayangel, I'm an engineer at Oculus and I'm looking into this. Can you send a zip of a Unity project with the bug, so I can repro it and look into fixing it on my end? I tried repro-ing it by adding the following lines at the beginning of Start() in a script:
This worked fine for me on OVRPlugin 1.24.2 and Unity v5.6.4p2. A zip file would be great, and let me know if the usage above mirrors the code that triggered the bug on your end.
There was one problem with this however: the proximity sensor does not work after `XRSettings.LoadDeviceByName("");` but we figured out a hack that seems to work:
If you're still the right engineer to look into this @theevader, try to toggle VRSettings.enabled in an update loop, not the Start method. Our app requires users to take on and off the headset throughout the experience, and when they take it off we need to disable VR.