Skip to content

FirstPersonControls: Update interaction model.#33124

Draft
mrdoob wants to merge 2 commits intodevfrom
controls
Draft

FirstPersonControls: Update interaction model.#33124
mrdoob wants to merge 2 commits intodevfrom
controls

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Mar 5, 2026

Description

Changed the interaction model to require dragging to control the camera orientation, using pointer capture and movement deltas instead of tracking the absolute cursor position. This makes the controls feel more intentional and consistent with other drag-based controls. As a result, activeLook and handleResize() are no longer needed — the former has been removed and the latter replaced with a deprecated stub.

http://raw.githack.com/mrdoob/three.js/controls/examples/webaudio_sandbox.html
http://raw.githack.com/mrdoob/three.js/controls/examples/webgl_geometry_minecraft.html
http://raw.githack.com/mrdoob/three.js/controls/examples/webgl_geometry_terrain.html
http://raw.githack.com/mrdoob/three.js/controls/examples/webgl_shadowmap_performance.html

mrdoob and others added 2 commits March 5, 2026 17:27
…tas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrdoob mrdoob added this to the r184 milestone Mar 5, 2026
@mrdoob mrdoob marked this pull request as draft March 5, 2026 08:35
@mrdoob
Copy link
Owner Author

mrdoob commented Mar 5, 2026

Haven't tested mobile yet.

@mrdoob
Copy link
Owner Author

mrdoob commented Mar 5, 2026

Another option would be to change the lookAt based on the delta from the pointerdown position.
Like the previous beaviour except not hardcoded to the middle of the screen.

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 5, 2026

Haven't tested mobile yet.

Just tested the links on a Pixel 8a with Chrome and the controls don't work. The camera barely reacts on touch input. You just see a single tiny change in orientation when tapping on the display.

I would expect the camera moves towards the tapped location as long as you hold down the finger.

@mrdoob
Copy link
Owner Author

mrdoob commented Mar 5, 2026

Indeed, mobile is broken. Will fix later.

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.

2 participants