Search Unity

Inputtracking recenter not working on iOS

Discussion in 'AR/VR (XR) Discussion' started by Tunkali, Dec 12, 2017.

  1. Tunkali

    Tunkali

    Joined:
    Feb 5, 2013
    Posts:
    54
    Hello,

    I have a cardboard app with a VR & Non-VR Mode. In the VR Mode everything works fine. But in the Non-VR Mode nothing seems to happen.

    The NonVR Camera works like this:

    Code (CSharp):
    1. transform.localRotation = InputTracking.GetLocalRotation(XRNode.CenterEye);
    My Recenter Script (not) works like this:

    Code (CSharp):
    1. cam.transform.eulerAngles = new Vector3(0,0,0);
    2. XRDevice.SetTrackingSpaceType (TrackingSpaceType.Stationary);
    3. InputTracking.disablePositionalTracking = true;
    4. InputTracking.Recenter();
    5. InputTracking.disablePositionalTracking = false;
    6. GvrCardboardHelpers.Recenter();
    Is it a Bug? Or what do I forget?

    Thank you in advance!