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 rotation logic to use invertRotation flag #12762

Merged
merged 3 commits into from
Jul 19, 2022
Merged

ArcRotateCamera: Modify rotation logic to use invertRotation flag #12762

merged 3 commits into from
Jul 19, 2022

Conversation

PolygonalSun
Copy link
Contributor

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 the invertRotation flag or its numerical counterpart, the invertRotationSpeed 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.

@azure-pipelines
Copy link

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.

@azure-pipelines
Copy link

@azure-pipelines
Copy link

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.

@azure-pipelines
Copy link

@azure-pipelines
Copy link

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.

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.

LGTM!

There is also the inverseRotationSpeed parameter, but I am not sure how to incorporate it in an ArcRotateCamera.

@sebavan
Copy link
Member

sebavan commented Jul 19, 2022

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 ?

@RaananW
Copy link
Member

RaananW commented Jul 19, 2022

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 :-)

@azure-pipelines
Copy link

@PolygonalSun PolygonalSun enabled auto-merge (squash) July 19, 2022 16:20
@PolygonalSun PolygonalSun merged commit effd10a into BabylonJS:master Jul 19, 2022
RaananW pushed a commit that referenced this pull request Dec 9, 2022
…2762)

* Add logic to allow invertRotation to affect ArcRotateCamera

* Moved inverse calls to just one line

* lint/format fix

Former-commit-id: 33cadbadabd6815ac8d7294efa3f0a92917beb85
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.

3 participants