Search Unity

How to parent the Vive [CameraRig] with a player model properly

Discussion in 'AR/VR (XR) Discussion' started by RSH1, Apr 30, 2016.

  1. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    I'm currently using the Vive [CameraRig] prefab as a child object to a capsule to represent the player (so the player should be able to look down and see their body), however, with the head tracking the camera moves itself depending on the player's physical location, so the camera becomes misaligned with the body mesh (and thus also the player's collider).

    Is there a different way I should be going about doing this? Or is there a way of stopping the camera moving with the Vive (limit it to only rotation)?
     
  2. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    One possible solution is to have the body actually react accordingly. The Final IK asset includes an example of a VR body setup that does that sort of thing. Haven't tried anything like that in VR myself.
    https://www.assetstore.unity3d.com/en/#!/content/14290

    With the Oculus SDK, there used to be a way to turn off the positional tracking and only allow rotation; there may be a way to do it with SteamVR or whatever. I'm thinking that's not a good solution, as positional tracking is a big factor in reducing motion sickness, is more immersive, and is what Vive players are going to expect.
     
  3. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Are you actually displaying the whole body where it would look awkward to make it a child of any of the gameobjects related to the head? If you did so the body wouldn't get left behind when you move, but instead it would be a bit off for leans (If you leaned forward the body would still be directly below where in reality it's just your head that is closer but the body is still further back). Any time you're pretty vertical the body would be below you as you'd expect.
     
  4. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    Putting the body in the parent object and as a child of [CameraRig] both have this problem, as the player moving around in roomscale disorientates the camera from the body's position.
     
  5. kogrob

    kogrob

    Joined:
    Jul 10, 2020
    Posts:
    6
    Bumping this old thread-- has anyone figured this out?