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

OrbitControls: pointers list only used for identification #27420

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

sciecode
Copy link
Contributor

@sciecode sciecode commented Dec 21, 2023

Fixes #27073

This is a first step into adjusting the way pointer-events were implemented, there are currently many issues stemming from this functionality which can be easily addressed by careful rework.

Previously pointers list was used to store the start events of when a new pointerId is detected, however these events were mistakenly used to recall previous positions, which is not a valid application, as these positions can change. Therefore, only pointerPositions should be used, as they are correctly updated on start and move events.

In order to avoid confusion, I've re-purposed the pointers list to exclusively keep track of active pointers' pointerId.

The linked issue is easily reproducible (dev) by starting a 1-touch event, moving it to a different position and placing the 2nd-touch. The camera will jerk, as it assumes a wrong initial position (because of using the original start event position).

Current Example - Dev
PR Example

I'm currently studying another fix for an issue that prevents certain pointer-events from functioning after some specific actions, I believe it is related to #27333. Although I can't be certain as I do not own a device capable of testing the specific details of that issue.

Signed-off-by: Guilherme Avila <3927951+sciecode@users.noreply.github.com>
@mrdoob mrdoob added this to the r160 milestone Dec 22, 2023
@mrdoob mrdoob merged commit bc0be46 into mrdoob:dev Dec 22, 2023
11 checks passed
@sciecode sciecode deleted the dev-orbit-pointers branch December 22, 2023 12:59
AdaRoseCannon pushed a commit to AdaRoseCannon/three.js that referenced this pull request Jan 15, 2024
Signed-off-by: Guilherme Avila <3927951+sciecode@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants