Search Unity

Custom positional tracking with Unity GVR native integration

Discussion in 'Daydream' started by mayorandrew, May 19, 2017.

  1. mayorandrew

    mayorandrew

    Joined:
    Sep 11, 2015
    Posts:
    2
    I want to incorporate custom position & rotation tracking into the Unity Google VR Android application. Basically, I have a native Android library that provides the camera view matrices for each frame. And I want to somehow supply these matrices to the Unity.

    I was able to provide this data into the legacy Google VR SDK by changing the GvrHead C# script, so it uses my own data instead of GvrViewer.Instance.HeadPose.Orientation and GvrViewer.Instance.HeadPose.Position.

    With the Unity 5.6 native GVR integration and newest 1.50.0 version of Google VR SDK all that legacy code is gone, and now all transformations are operated inside Unity. Is there any way left to provide Unity with my custom data, maybe an undocumented callback of some kind? Or, at least, the way to freeze the camera, so it does not move with player's head, but still does VR rendering?
     
  2. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I don't think there is anymore. Checking virtual reality supported renders for vr but it also gives the head tracking control over the camera.
     
  3. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
  4. mayorandrew

    mayorandrew

    Joined:
    Sep 11, 2015
    Posts:
    2