Simulate XRController3D and XRCamera Input
-
Setup your scene for VR. You can start by following Bastiaan Olij's tutorials https://www.youtube.com/watch?v=wDXnsy2IH1A
-
Insert
XRSimulator.tscn
into Autoload.
When you play the scene, your cursor will be locked in the screen. Press Esc
whenever you want to release the cursor.
- Move your mouse to look around
- Scroll to move the camera up and down
- Press
WASD
to move the left controller's joystick - Press the arrow keys to move the right controller's joystick
Selecting a controller allow you to move, rotate, and press a button of the selected controller.
- Hold
Q
to select the left controller - Hold
E
to select the right controller
- Move your mouse to move the controller
- Scroll to move the controller closer or further away from the camera
- Move your mouse while holding
Shift
to rotate the controller
- Hold
Left Click
to press Trigger (trigger_click
will be pressed andtrigger
will be set to 1) - Hold
Right Click
to press Grip (grip_click
will be pressed andgrip
will be set to 1)
Pressing 1 to 8 (on the alphanumeric keyboard), -
, =
and Enter
will press or touch buttons on the OpenXR Action Map. On an Oculus Touch controller, pressing 1 presses Y
and B
, 2 presses X
and A
, -
presses the primary joystick, and Enter presses the menu button.
- 1 presses by_button
- 2 presses ax_button
- 3 presses by_touch
- 4 presses ax_touch
- 5 presses trigger_touch
- 6 presses grip_touch
- 7 presses secondary_click
- 8 presses secondary_touch
-
presses primary_click=
presses primary_touchEnter
presses menu_button
As stated before, pressing Left Click
presses trigger_click, and Right Click
presses grip_click.