cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect that the TrackingOrigin has changed

WillemMahy
Level 3
My application needs to detect that the tracking origin is changed,
i.e. when the relative location of the TrackingSpace origin in relation to the physical play space, is changed.

AFAIK, this can happen in the following cases:
A) Reset view from universal menu
B) OvrManager.display.RecenterPose() called from application
C) TrackingLost and TrackingAcquired happening.

Question 1:
Is the above list correct and complete?

Question 2:
How to detect any possible tracking origin change?

A) I did not find a way to detect a 'Reset view' from the universal menu, it does not trigger the OVRManager.display.RecenteredPose event.  Luckily, 'Reset view' from the universal menu can be disabled by OVRManager.instance.AllowRecenter =false, to prevent it from happening in the first place.

B) Can be detected by registering to the OVRManager.display.RecenteredPose event.

C) I tried to reproduce this by:
- Scenario 1: obscuring the HMD tracking cameras temporarily
- scenario 2: pressing the HMD power button twice (turing it into sleep and then on again).

Counter-intuitively the TrackingLost and TrackingAcquired are not raised, instead the following events are raised during my tests:

*Obscure tracking cameras OR press HMD power button here*
1) HMDUnmounted
2) VrFocusLost

*Uncover tracking cameras  OR press HMD power button here*
3) HMDMounted
4) VrFocusAcquired

The tracking origin also seems to change only sporadically when performing this test!?
In which scenario(s) exactly is the 'TrackingLost' expected to be raised then?

Environment:
* Quest v1
* Unity 2020.1.11f1
* Running from Unity editor using Oculus Link
0 REPLIES 0