OrbitControls: pointers list only used for identification #27420
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 newpointerId
is detected, however these events were mistakenly used to recall previous positions, which is not a valid application, as these positions can change. Therefore, onlypointerPositions
should be used, as they are correctly updated onstart
andmove
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.