Search Unity

XR and UI

Discussion in 'Input System' started by vincismurf, Oct 14, 2019.

  1. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    I noticed in the video on today's blog a mention of XR. . . . in the old system one had to have a custom Input Module to interact with UI. Basically the player had to raycast to a collider which represents the Canvas space and then translate the collision position to a location on the UI. It is very cumbersome, has this been addressed in the new system?
     
  2. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    It looks like it does !!! JOY!

    https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/UISupport.html

    Tracked Device Position An Action delivering a 3d position of one or multiple spatial tracking devices, such as XR hand controllers. In combination with Tracked Device Orientation, this allows XR-style UI interactions by pointing at UI selectables in space.

    Tracked Device Orientation An Action delivering a quaternion representing the rotation of one or multiple spatial tracking devices, such as XR hand controllers. In combination with Tracked Device Position, this allows XR-style UI interactions by pointing at UI selectables in space.

    Tracked Device Select An Action used to submit "clicks" on UI selectables coming from a spatial tracking device. For example, you can map this to the trigger button on an XR controller to allows XR-style UI interactions in combination with Tracked Device Position and Tracked Device Orientation.