Skip to content

Commit 3d4a488

Browse files
authored
Merge pull request #383 from reaviz/deprecated-apis-update
Update Deprecated APIs
2 parents 43f1d36 + 26484b7 commit 3d4a488

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/useDrag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const useDrag = ({
5858
const { eventObject, point } = event;
5959

6060
// Save the offset of click point from object origin
61-
eventObject.getWorldPosition(offset).sub(point);
61+
offset.setFromMatrixPosition(eventObject.matrixWorld).sub(point);
6262

6363
// Set initial 3D cursor position (needed for onDrag plane calculation)
6464
mouse3D.copy(point);

0 commit comments

Comments
 (0)