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

ArcRotateCamera: Modify offset math to correctly zoom to point #14209

Merged
merged 3 commits into from Aug 29, 2023

Conversation

PolygonalSun
Copy link
Contributor

There was a previous fix that updated the ArcRotateCamera to factor in a targetScreenOffset to zooming to a specific point. Unfortunately, there was an issue with how it was modifying the ray origin used to determine zoom destination. This PR changes the math up to properly convert the screen offset to world space so that the zoom origin is calculated correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 25, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 25, 2023

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 28, 2023

Visualization tests for webgl1 have failed. If some tests failed because the snapshots do not match, the report can be found at

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14209/merge/testResults/webgl1/index.html

If tests were successful afterwards, this report might not be available anymore.

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 28, 2023

Visualization tests for webgl2 have failed. If some tests failed because the snapshots do not match, the report can be found at

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14209/merge/testResults/webgl2/index.html

If tests were successful afterwards, this report might not be available anymore.

1 similar comment
@bjsplat
Copy link
Collaborator

bjsplat commented Aug 28, 2023

Visualization tests for webgl2 have failed. If some tests failed because the snapshots do not match, the report can be found at

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14209/merge/testResults/webgl2/index.html

If tests were successful afterwards, this report might not be available anymore.

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 28, 2023

Visualization tests for webgl1 have failed. If some tests failed because the snapshots do not match, the report can be found at

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14209/merge/testResults/webgl1/index.html

If tests were successful afterwards, this report might not be available anymore.

@PolygonalSun PolygonalSun merged commit 01120a4 into BabylonJS:master Aug 29, 2023
10 checks passed
@PolygonalSun PolygonalSun deleted the zoom-offset-world branch August 29, 2023 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants