Skip to reading
VR Headset Setup & Testing

Fix a stick that never moves

Edition 0.86.3.4

Prepare scenes and input for VR, export to a suitable Godot/OpenXR setup, and follow headset-specific packaging and testing routes for Quest, Valve Index and Galaxy XR.

Download PDFView PDF page

GODOT / A VERIFIED VERSION-SPECIFIC ISSUE

In the inspected 4.7.2 map, both Touch thumbsticks feed a Vector2 action named primary. Clicking either stick feeds primary_click. PCA 0.86.3.4 reads thumbstick for the direction and listens for thumbstick_click for the press. A trigger can work perfectly while both sticks seem dead.

01. Open the target’s tab in the action map. Confirm the names going into the thumbstick and thumbstick-click rows. If your map already supplies the names PCA expects, leave the code alone. If yours matches the inspected map, save a copy of the exported script before editing.

02. Open res://scripts/runtime/openxr_player.gd. In _process and _move, change the action argument to primary. After the changes the two lines read as follows.

Code example
var turn: float = right_hand.get_vector2(&"primary").x
Code example
var stick: Vector2 = left_hand.get_vector2(&"primary")

03. At the top of the same script, edit the stick-click entry inside PHYSICAL_BUTTONS. Keep its right-hand value, which is PCA’s editable Thumbstick slot. Leave the A/X and B/Y entries as they are.

Code example
"primary_click": "thumbstick",

04. Save, restart and test. Temporarily assign a visible action to the PCA Thumbstick click if it is Disabled. Tilt left to walk in Continuous or Both, tilt right to snap turn, then click. Verify each separately. If snap turns work but walking does not, check Locomotion and whether input is locked.

I tested this with a simulated Godot controller. A 0.9 stick input came through as 0.9 on primary and 0 on thumbstick. The click emitted primary_click. After the edit, that click reached the assigned Pause action in the mapping test. Travel direction, grip pressure and feel still need a real controller.

Page 9 of 19Permalink
Go to page