We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 43f1d36 + 26484b7 commit 3d4a488Copy full SHA for 3d4a488
src/utils/useDrag.ts
@@ -58,7 +58,7 @@ export const useDrag = ({
58
const { eventObject, point } = event;
59
60
// Save the offset of click point from object origin
61
- eventObject.getWorldPosition(offset).sub(point);
+ offset.setFromMatrixPosition(eventObject.matrixWorld).sub(point);
62
63
// Set initial 3D cursor position (needed for onDrag plane calculation)
64
mouse3D.copy(point);
0 commit comments