Search Unity

Steam VR: Lock position but allow rotation

Discussion in 'AR/VR (XR) Discussion' started by blifson, Mar 3, 2019.

  1. blifson

    blifson

    Joined:
    Nov 9, 2018
    Posts:
    2
    I currently have a project that uses Steam VR. I want the player be from a particular avatars perspective who is stationary, with the exception of its head that rotates.

    I've been having trouble maintaining this perspective, as the player can easily move outside of the avatars head. I've looked online to some people who were able to negate positional tracking, but those also canceled out the rotation, which I don't want.

    I was wondering if there was a way through script to lock the Steam VR camera to a particular spot, but still allow rotation.

    THank you
     
  2. blifson

    blifson

    Joined:
    Nov 9, 2018
    Posts:
    2
    Hello,
    I just wanted to check again if anyone had a solution to this issue.
    Thank you
     
  3. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    We do this when the player bumps his head into something. You have to countermove the camerarig root transform.Just know if you do this too much players will become motionsick. Here is example from our game