Repository navigation
camera: first-person mouse look (turn in place, move along the aim) - #1212
Merged
Merged
Conversation
Mouse look in Orbit turned the orbit about its centre, a third-person camera, so the mouse swung the eye round a far-off point and the keys slid the view across the ground. Now, by default, the eye stays where it is and the mouse sets its yaw (about the world's up) and pitch; W/S move it along the way it looks, A/D strafe across it in the ground's plane, Space/Ctrl rise and sink, at the move speed, as in Fly. The orbit's elevation range no longer stops the look at the horizon, and an orbit drag that starts outside the range moves toward it instead of snapping. arigl's room keeps the third-person camera behind its avatar through the new setMouseLookOrbits(true) (state settings.mouse_look_orbits).
transfix
enabled auto-merge (squash)
November 13, 2026 02:16
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.
Joe: mouse look is wrong. It should yaw and pitch the camera where it stands; forward/back move along the camera's forward vector, left/right strafe in a plane parallel to the terrain (no roll yet).
What was wrong. Mouse look in Orbit (the Controls window's "Mouse look", how the terrain lab opens) turned the orbit about its centre, a third-person camera: the mouse swung the eye around a point far ahead, and W/A/S/D slid the orbit centre across the ground. The orbit's elevation range also stopped the look at the horizon.
Now, by default (first person):
arigl's avatar room keeps the third-person camera behind its avatar through the new
CameraController::setMouseLookOrbits(true)(statesettings.mouse_look_orbits). Fly already moved this way and is unchanged.Tests (local MSVC Release, all pass):
cvcgl_camera(section M rewritten for first person: the eye stays put, right turns right, up looks up, no elevation clamp, no snap on a later drag; the third-person checks kept undersetMouseLookOrbits(true); section Q adds W moving 5 m along the 3-D look, D strafing level, Space rising),cvcgl_camera_idle,cvcgl_camera_map,cvcgl_camera_sdl_fly,ariadne_runtime_test.Not checked: a real browser's pointer lock (headless Chrome refuses it).