Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
juanphm's avatar
juanphm
Protege
4 years ago
Solved

Meta Avatars Controller tracking with OVRCameraRig not working with oculus controllers.

I'm trying to update my project to use the new meta avatars 9.0, but we need to keep the OVRCameraRig. 

When the avatar appears the head tracking works, but the wrists only move if you use hand tracking and not controller tracking. 

I'm using the AvatarSdkManagerHorizon prefab. 

 

 

 

 

 

  • juanphm's avatar
    juanphm
    4 years ago

    Greetings, I have fixed the problem. 

     

    To fix the problem go through the next steps: 
    1. Go to SampleInputTrackingDelegate.cs line 26 (this is just a percussion) the if statement should be 

    if (_ovrCameraRig != null)

    2. Same script lines 36,37 changed them to (we will create the variables in the other script)

    leftController = _ovrCameraRig.CustomLeftControllerAnchor,
    rightController = _ovrCameraRig.CustomRightControllerAnchor

    3. Either you create an inherited class from OVRCameraRig or you updated it, inside declare the variables 

    public Transform CustomLeftControllerAnchor;
    public Transform CustomRightControllerAnchor;

    4. Add the references of the OVR Camera Rig in the scene, with the transform of your controllers. or whatever tracking you would like to do. 

10 Replies

Replies have been turned off for this discussion
    • juanphm's avatar
      juanphm
      Protege

      Greetings, I have fixed the problem. 

       

      To fix the problem go through the next steps: 
      1. Go to SampleInputTrackingDelegate.cs line 26 (this is just a percussion) the if statement should be 

      if (_ovrCameraRig != null)

      2. Same script lines 36,37 changed them to (we will create the variables in the other script)

      leftController = _ovrCameraRig.CustomLeftControllerAnchor,
      rightController = _ovrCameraRig.CustomRightControllerAnchor

      3. Either you create an inherited class from OVRCameraRig or you updated it, inside declare the variables 

      public Transform CustomLeftControllerAnchor;
      public Transform CustomRightControllerAnchor;

      4. Add the references of the OVR Camera Rig in the scene, with the transform of your controllers. or whatever tracking you would like to do. 

      • juanphm's avatar
        juanphm
        Protege

        Don't forget to add the reference to the OVR Camera Rig inside your AvatarSDKManager, inside the Sample Input Manager component. 

  • I was about to just take one of the day sample scenes, and copy over the key game objects in place of the OVRig and XRRig. This worked for me.  Hope it works for you as it for sure works with controllers. 

  • Has anyone got this to work as smooth as Meta Horizons avatars are?

     

    The avatars do not move smoothly. Changing the update rate to send every frame makes the avatars move with a faster refresh rate, but it seems there is some jitter in the positions that are being sent/received.

     

    Any help, trips, or tricks would be appreciated.

  • hari177's avatar
    hari177
    Honored Guest

    I had the same issue. The solution by Astrologorithm worked for me. But then I found out removing the CameraRig reference in the SampleInputManager script and leaving it blank do not need any of the above code changes. It worked automatically. But I attached SampleAvatarEntity as a child of OVRCameraRig gameobject.