Search Unity

SteamVR [CameraRig] and floor position of player, I don't get it

Discussion in 'AR/VR (XR) Discussion' started by johot, Jan 8, 2017.

  1. johot

    johot

    Joined:
    Apr 11, 2011
    Posts:
    201
    So I just started trying out SteamVR so I imported the package and opened the examples scene with the "sea of cubes". Everything worked fine and I was floating in the air looking at cubes.

    Now the thing I don't get however which is a lot easier with Oculus Unity SDK is how do I determine where to plant my players feet? Basically I only have a CameraRig that sits at 0,0,0, but how do I know how high above ground I should position it if I want to add a CharacterController for example?

    Can't find any documentation or samples either (except for that free floating sea of cubes).

    I tried moving my HMD to the floor and it will end up at about y= -0.72, but where is the floor at? y= -1?

    Any help from someone that successfully created a FPS controller for SteamVR?

    Thanks!
     
  2. kunzej

    kunzej

    Joined:
    Nov 27, 2016
    Posts:
    11
    Dear Johot,

    if the position of the CameraRig is at (0,0,0), the floor will be on y=0, so you should be able to move your hmd/controllers down to something like (0,0.1,0).
    If this is not the case, you might need to run your room setup again!
    You can also test this by checking the position of your Vive chaperone (the blue lines/walls or the blue circle on the ground). If this is not close to the real ground you need to rerun your room setup. In unity it might also be helpful to add a cube to the scene with it's surface at y=0.
    Once you have the ground right, everything will be super easy. Add
     
  3. johot

    johot

    Joined:
    Apr 11, 2011
    Posts:
    201
    Hi kunzej!

    Thank you for your response!

    You are totally correct thank you very much!

    I just found the SteamVR_TestThrow scene in the extras folder and this was just how they set it up. Probably got confused because of the sea of cubes sample. (Btw, if anyone new to this reads this, beware of the camera scale in the sea of cubes sample being set to 0.1, it can really screw you up before you notice :p)
     
    InMindStudios likes this.