Search Unity

Disable the automatic atribution of the vive controllers

Discussion in 'AR/VR (XR) Discussion' started by Bloadrick, Nov 2, 2016.

  1. Bloadrick

    Bloadrick

    Joined:
    Nov 2, 2016
    Posts:
    1
    Hi everybody,

    I'm kind of a newbi with the VR in unity and I want to disable the left/right attribution of the vive controllers.

    I'm using the Steam VR Plugin and the left and right controller are recognize by the most at the left/right of the helmet but I'm going to use one of the controller to track a real object so the controller is going to be fixed at this object.

    So I want to attribute the controller myself or I want a way to switch between the right and the left.

    I hope someone can help me.

    thanks.
     
  2. mdurand

    mdurand

    Joined:
    Aug 1, 2016
    Posts:
    45
    Hi Bloadrick-

    You should be able to iterate all controllers ususing SteamVR_Controller.Input() to identify and then refer to controllers by the index rather than by the hand. If you have the player identify controller they are holding via a button press at the beginning of your game then the other connected controller must be the one you are using to track an object.

    Make sure you code defensively to account for the fact that these indices as controllers are added and to account for when controllers lose tracking.

    Feel free to message me if you need more help.

    -Mike Durand
    Senior VR SW Engineer
    Unity Technologies
     
  3. Jamate

    Jamate

    Joined:
    Nov 14, 2016
    Posts:
    6
    Hello, How to do the same in Steam 2.0 where SteamVR_Controller class is not available. Thanks.
    J.Matej, TUZVO.sk