Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement panning in FirstPersonController #8166

Merged
merged 9 commits into from
Mar 14, 2024
Merged

Conversation

felixpalmer
Copy link
Collaborator

@felixpalmer felixpalmer commented Oct 4, 2023

Related to #8149

Background

Add panning motions to FirstPersonController, so that camera is moved in the plane normal to the view direction when shift key is held. Also integrates with dragMode. Test behavior here: https://jsfiddle.net/felixp/b5pugcyx/

Change List

  • Implementation for panStart, pan & panEnd methods

@felixpalmer felixpalmer added this to the v9.0 milestone Jan 17, 2024
@felixpalmer felixpalmer mentioned this pull request Jan 18, 2024
14 tasks
@coveralls
Copy link

coveralls commented Mar 13, 2024

Coverage Status

coverage: 84.064% (-0.01%) from 84.074%
when pulling d52cace on felix/first-person-pan
into b1e0ba7 on master.

@chrisgervang
Copy link
Collaborator

chrisgervang commented Mar 13, 2024

I was playing around with this on mobile today and was wondering if we could use a two finger up/down gesture to control vertical movement. It works well for looking and walking around!

Alternatively, could the controller be reconfigured with a prop to have the scroll (zoom?) action behave as before (move you in the direction you're pointing)?

For use cases I'm familiar with there are two main modes this controller gets used in: a mode to freely move in 3D space to an area of interest, and a mode to walk around that area of interest as a human would for closer inspection.

Desktop has controls for both modes with mouse and keyboard, but mobile would need some way to perform vertical movement

@felixpalmer
Copy link
Collaborator Author

felixpalmer commented Mar 13, 2024

@chrisgervang have you tried it with touchRotate=true and dragmode='pan'?

@chrisgervang
Copy link
Collaborator

Oh nice, dragMode: "pan" works great for that. Apps can add a toggle to support mobile well.

@felixpalmer felixpalmer merged commit 19d3018 into master Mar 14, 2024
4 checks passed
@felixpalmer felixpalmer deleted the felix/first-person-pan branch March 14, 2024 12:29
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.

3 participants