-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 rotation logic to use invertRotation flag #12762
ArcRotateCamera: Modify rotation logic to use invertRotation flag #12762
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12762/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12762/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12762/merge#BCU1XR#0 |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12762/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12762/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12762/merge#BCU1XR#0 |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There is also the inverseRotationSpeed
parameter, but I am not sure how to incorporate it in an ArcRotateCamera.
We discussed this one with @PolygonalSun yesterday and think it might be weird as we already have the sensitvity thingies and relying on both was strange ? |
I don't see a reason to add support to that. I see that as approved. The ArcRotate doesn't have the concept of speed in the sense of a free or universal camera. We might want to move this parameter up one level (outside of the target camera), but that might have different consequences. Fact is - the arc rotate camera never supported it, but so far no one required this feature :-) |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12762/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12762/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/12762/merge#BCU1XR#0 |
…2762) * Add logic to allow invertRotation to affect ArcRotateCamera * Moved inverse calls to just one line * lint/format fix Former-commit-id: 33cadbadabd6815ac8d7294efa3f0a92917beb85
The
invertRotation
flag is primarily used with the FreeCamera and any Cameras that inherit from it. Since the ArcRotateCamera uses different rotation logic, it never actually makes use of theinvertRotation
flag or its numerical counterpart, theinvertRotationSpeed
property. This PR allow the user to use this flag with the ArcRotateCamera and specify the inverted rotational speed. The discrepancy was initially brought up in the forum thread: https://forum.babylonjs.com/t/inverting-arcrotatecamera-controls-for-photodome/32147/6.