Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

InputTracking current LeftHand/RightHand

Discussion in 'AR/VR (XR) Discussion' started by scvnathan, Feb 5, 2018.

  1. scvnathan

    scvnathan

    Joined:
    Apr 29, 2016
    Posts:
    75
    So I've been trying to figure out when Unity defines what physical controller is mapped to the left hand / right hand designations when set in the TrackPosedDriver.
    My goal is to know when the physical controllers have been swapped and I thought checking the states via InputTracking.GetNodeStates might tell me, but it looks like the XR InputTracking system only sets what is left and right once. So for example, checking for nodeType == XRNode.LeftHand still refers to the controller that WAS physically left when Unity started, but is now physically farthest right, relative to the headset.

    Anyone know of a better way to update the current left/right hands than to just manually do the math myself?
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    So, the idea of "left" and "right" hand controller is defined by the API, not by the current location of the controller.

    physically swapping the location of the controllers is not treat as swapping hands by the API (as you can for example, cross your arms while still maintaining the "handedness" of the controllers). We will correctly update the "handedness" of the data when the API informs us that a swap has taken place at the API level.
     
  3. scvnathan

    scvnathan

    Joined:
    Apr 29, 2016
    Posts:
    75
    Ok thanks for the clarification. I was just wondering if the InputTracking API could assist in finding relative handedness.
     
  4. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    No we currently do not offer that as part of our api :(