-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Labels
bugSomething isn't workingSomething isn't working
Description
three
version: v174- Chrome, Windows
Problem description:
- Open https://threejs.org/examples/misc_controls_orbit.html with a PC that has a touch screen and a mouse
- Click and hold on the canvas with a mouse
- Touch the canvas with your finger (still keeping the mouse button down)
This is triggered:
OrbitControls.js:932 Uncaught TypeError: Cannot read properties of undefined (reading 'x')
at OrbitControls._handleTouchStartDolly (OrbitControls.js:932:37)
at OrbitControls._handleTouchStartDollyPan (OrbitControls.js:943:31)
at OrbitControls.onTouchStart (OrbitControls.js:1428:11)
at OrbitControls.onPointerDown (OrbitControls.js:1172:8)
Suggested solution:
OrbitControls seems to maintain pointers
array using onPointerDown
and other pointer events, but maintains pointerPositions
using only touch events. Not all pointer events are touch events, so those two arrays are not in sync, and that is why getSecondPointerPosition
returns undefined.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working