Repository navigation
Feature/webxr testing - #90
Merged
Merged
Conversation
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
force-pushed
the
feature/webxr-testing
branch
from
November 25, 2026 15:21
677f46a to
ec316d3
Compare
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
force-pushed
the
feature/webxr-testing
branch
from
November 25, 2026 15:41
ec316d3 to
c6ec08a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.