Skip to content

Feature/webxr testing - #90

Merged
mattvb91 merged 5 commits into
feature/webxr-locomotionfrom
feature/webxr-testing
Nov 25, 2026
Merged

mattvb91 merged 5 commits into
feature/webxr-locomotionfrom
feature/webxr-testing

Conversation

@mattvb91

Copy link
Copy Markdown
Member

No description provided.

@mattvb91
mattvb91 added this pull request to stack #87 November 25, 2026 15:20
Desktop controls that move the camera itself (orbit, fly) would otherwise
keep the VR offset and turns. Games placing the view with camera.place()
place it again anyway.
@mattvb91
mattvb91 force-pushed the feature/webxr-testing branch from 677f46a to ec316d3 Compare November 25, 2026 15:21
The template enables VR where the browser can do it. VRControls walks the
character with the left stick, the way it's pushed relative to where the
player looks, through the same CL_MOVE as the keyboard, snap turns the
view around the character with the right stick and places the chase
view every rendered frame.

PlayerController now sends held movement again every 200ms. The server
lets go of the keys after 400ms without a command, which the keyboard
only escaped because its yaw smoothing changed the yaw a little every
tick; the stick's yaw is exact, so the character stopped after 400ms.

e2e/xr (npm run test:xr-e2e, also in CI) plays the template in an
emulated Meta Quest 3 through iwer.
… mode

The keyboard and mouse were ignored in VR: the stick's movement always
replaced the keys, and the orbit controls are off there. WASD now walks
relative to where the player looks while the stick isn't pushed, Q and E
snap turn the view around the character and dragging the mouse sideways
turns it. Never up and down, which is the headset's.
The animation mixer stepped with the 30 Hz tick, so animations played at
30 fps on a 60-120 Hz display and in a VR headset. They now advance on
beforeRender with the frame's time.
A character's position only changes with the tick and network updates, 30
times a second and unevenly, and its model was moved with it. In VR the
chase view moves every frame, so the character stepped back and forth
against it, which a headset shows as a double image. The model now
follows the position every rendered frame, and the VR view aims at the
model, so the character holds still in the view while walking.

The VR e2e checks that the model moves every frame and stays put in the
view.
@mattvb91
mattvb91 force-pushed the feature/webxr-testing branch from ec316d3 to c6ec08a Compare November 25, 2026 15:41
@mattvb91
mattvb91 merged commit d39c245 into dev Nov 25, 2026
25 of 27 checks passed
@mattvb91
mattvb91 deleted the feature/webxr-testing branch November 25, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant