-
Notifications
You must be signed in to change notification settings - Fork 6
XRInputMap
An XRInputMap datum can be created for each type of controller, Touch, Vive, or Windows MR. An input map defines how the physical buttons of a controller should be routed to a unified set of input abstractions (i.e. Trigger Button, Grab Button, etc.). This allows your application to become independent of the specifics of the controller hardware it is resting on.
An XRInputMap datum can be created by going to "Assets > Create > XR Input Map". A selection of preconfigured XRInputMap datums are located in "Datum/Mappings" for the Vive, Oculus and Windows MR controllers.
The Library comes with a set of preconfigured XRInputMap's for Vive, Oculus and Windows MR controllers.
A mapping description consists of an Input Name, Chirality (left or right), an Input Type and whatever configuration the Input Type requires.
-
The system has these input names which can be mapped to:
- TriggerButton
- GrabButton
- Joystick
- JoystickButton
- Button0
- Button1
- Button2
- Button3
- Button4
- Button5
- Button6
- Button7
- JoystickUp
- JoystickRight
- JoystickDown
- JoystickLeft
-
The system currently has these Input Types:
- Button - A standard button input with down, hold, release.
- Threshold Button - Converts an Axis 1D into down, hold, release button events.
- Axis 1D - Gives you a single 0 to 1 scalar value of how much the axis is being pressed.
- Axis 2D - Gives you two 0 to 1 scalar values, used for something like a joystick X and Y.
An XRInputMap is loaded into an XRUserRootConfig to be paired with a XRUserController and a XRControllerModel in order to make a complete description of of a controller.