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

TouchButton3D's getPressDepth(position) call has depth discrepancy #12910

Merged
merged 1 commit into from
Aug 29, 2022
Merged

TouchButton3D's getPressDepth(position) call has depth discrepancy #12910

merged 1 commit into from
Aug 29, 2022

Conversation

RaananW
Copy link
Member

@RaananW RaananW commented Aug 29, 2022

Fixes #12109

The issue is not exactly as described in the ticket. During apointer move, the cached integer was not updated, so onPointerMove you wouldn't be able to check the depth to the button. onPointerDown's depth is correct, as onPointerDown is triggered when the button is defined as pressed, which is not when the sphere's center is at the end of the button, but a little before. This "little" before is defined by the pickRadius in near interaction (0.02 units).

This PR updated the height variable on pointer move as well, which would allow to check the distance correctly when using pointer move.

@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

@RaananW RaananW merged commit 2b7783d into BabylonJS:master Aug 29, 2022
@RaananW RaananW deleted the RaananW/issue12109 branch August 29, 2022 15:07
RaananW added a commit that referenced this pull request Dec 9, 2022
…12910)

Fixes #12109

Former-commit-id: f46cfc14ebd251e726e679e8f38eb0e97bfb16be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TouchButton3D's getPressDepth(position) call has depth discrepancy
2 participants