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

Camera: Modified isMouseEvent bool logic for Safari #12655

Merged
merged 1 commit into from
Jun 15, 2022
Merged

Camera: Modified isMouseEvent bool logic for Safari #12655

merged 1 commit into from
Jun 15, 2022

Conversation

PolygonalSun
Copy link
Contributor

@PolygonalSun PolygonalSun commented Jun 15, 2022

There was an issue found in the forum where movement of the UniversalCamera, using a mouse, on Safari wasn't stopping properly. After investigating the issue, it was found that the mouse events were triggering both mouse and touch movement. The main issue was that, in FreeCameraTouchInput, the isMouseEvent boolean was incorrect being evaluated as false for mouse because the assigning logic was looking for a parameter that isn't available to mouse events generated in Safari. The fix was to modify the logic to work with Safari-specific mouse events.

Relevant Forum Link: https://forum.babylonjs.com/t/keyboard-control-not-working-for-latest-universalcamera-in-desktop-safari/31314/8

@PolygonalSun PolygonalSun marked this pull request as ready for review June 15, 2022 00:59
@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

@jure
Copy link
Contributor

jure commented Jun 15, 2022

Good hunting! Reverting the fix from this commit (made 28 days ago) 6c9bd9c resolved our issues completely, including the keyboard navigation issue that was resolved in a different way in #12649. So this is definitely the root cause.

The fix in the this PR also resolves both of our issues. If it also resolves the issue from #12541, then it's good to go :).

@PolygonalSun PolygonalSun merged commit 893ed63 into BabylonJS:master Jun 15, 2022
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