Search Unity

Feedback Provide tracked device identity to interacted UI elements for XR toolkit

Discussion in 'AR/VR (XR) Discussion' started by CharlieBudd, Apr 7, 2020.

  1. CharlieBudd

    CharlieBudd

    Joined:
    Jul 24, 2017
    Posts:
    17
    I have some UI in my application which does slightly different actions depending on which hand is used to press the button. However I cant find a simple way of getting this information with out duct taping on some hacky work around.

    I had a poke around in the XR toolkit code and it seems to me somebody forgot to forward the pointerID from the TrackedDeviceModel to the PointerEventData in UIInputModule.ProcessTrackedDevice(...).

    Just adding eventData.pointerId = deviceState.pointerId at least lets me differentiate between hands, but I cant find a way to determine which hand corresponds to which pointerId.