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: Modified zoomOn to use same logic as FramingBehavior #14387

Merged
merged 5 commits into from Oct 9, 2023

Conversation

PolygonalSun
Copy link
Contributor

A user on the forum found that the zoomOn function was found to be incorrectly determining radius for zooming on provided meshes. This PR contains a change that takes some of the logic used for the ArcRotateCamera framing behavior and uses that to determine how far to zoom.

Forum Link: https://forum.babylonjs.com/t/arcrotate-camera-zoomon-not-working-as-expected/38130/1

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 3, 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 Oct 3, 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 Oct 3, 2023

Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the frustrumSlope function is only use in this context, I would suggest to call it from within LowerRadius... instead of separately outside ?

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two comments, otherwise - looks good

packages/dev/core/src/Cameras/arcRotateCamera.ts Outdated Show resolved Hide resolved
packages/dev/core/src/Cameras/arcRotateCamera.ts Outdated Show resolved Hide resolved
@sebavan sebavan merged commit f2521d5 into BabylonJS:master Oct 9, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants