Search Unity

How to use HTC Vive controllers without the headset?

Discussion in 'AR/VR (XR) Discussion' started by sergiobd, Nov 4, 2017.

  1. sergiobd

    sergiobd

    Joined:
    May 14, 2014
    Posts:
    37
    Hi all!

    I'm using the HTC Controllers as a 6DOF tracker for a camera. I do not need the headset for this application. I just asked in the stream community if it was possible to use the controllers without the headset. Apparently not.

    So, fine, I'll use my application with the headset connected, but, how can I force Unity to use another game camera (I dont want the headset's orientation to control the camera)?
    I tried:
    1. Using SteamVR CameraRig Prefab and deleting the Camera (head) object (and using a standard MainCamera) Unfortunately, this randomly changes my camera position making the app unusable.
    2. Deactivating Virtual Reality Supported in the Player setting. (Expecting that the SteamVR assets will do their magic). I wont recieve any input from controllers in this way.

    Any clue?
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    You can use a tracked pose driver to have the camera track directly from the pose of whatever controller you want to track.
     
  3. daveseidman1

    daveseidman1

    Joined:
    Jun 11, 2019
    Posts:
    2
    You've probably figured it out by now but for anyone else that lands here:
    https://docs.unity3d.com/ScriptReference/XR.XRDevice.DisableAutoXRCameraTracking.html

    Just set that to true in Start and you may also have to reset your camera's position as well as the headset's initial position and rotation seem to get applied to any active camera anyway.

    I'm now searching for a way to reset the FOV of non-VR cameras which is proving to be a headache.