Changing Controller Grip Button to Trigger
You might want to remap actions or swap the controls in the VR application. As an example, let's do this for the controller. We will remap the Use action from the Grip button to Trigger, and the grab action to the Grip button.
User input for the controller is defined in the VRControllerInput component. It is assigned to the left_preset_0 and right_preset_0 nodes (vr_player -> vr_input) in our VR sample.
To remap actions, do the following:
- Select the left_preset_0 node that contains settings for the left controller (the Bind -> Side parameter value is set to LEFT).
-
Change the Grab Button -> Button value to LEFT_AXIS, and the Use Button -> Button value to LEFT_GRIP:
- Select the right_preset_0 node that contains settings for the right controller.
- Change the Grab Button -> Button value to RIGHT_AXIS, and the Use Button -> Button value to RIGHT_GRIP.
- Save changes (Ctrl+S) and press the Play button to run the application.
Now you can grab objects by the trigger, and use them by the Grip side button.
Last update:
2024-12-13
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)