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

Fix initial camera jump #1061

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Fix initial camera jump #1061

merged 1 commit into from
Feb 7, 2025

Conversation

vincentfretin
Copy link
Collaborator

@vincentfretin vincentfretin commented Feb 7, 2025

This fixes point 3 of #1060

There were two issues here.
The initial lookAt in camera.js didn't match the set center in viewport.js

controls.center.set(0, 1.6, 0);

And the second issue was that center wasn't reset when loading another scene, you can also reproduce just by clicking on the compass, it also executes the same resetZoom fonction.

@vincentfretin vincentfretin requested a review from kfarr February 7, 2025 11:46
@vincentfretin vincentfretin self-assigned this Feb 7, 2025
@kfarr kfarr merged commit 0daea55 into main Feb 7, 2025
1 check passed
@kfarr kfarr deleted the fix-jump branch February 7, 2025 16:40
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