Skip to content

Commit 484b05e

Browse files
committed
fix issue where camera look would be enabled the second time you grab the pen
1 parent 6a4e0bd commit 484b05e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/mouse-events-handler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ export default class MouseEventsHandler {
124124
}
125125

126126
onMouseMove(e) {
127-
const shouldLook = this.isPointerLocked || (this.isLeftButtonDown && !this.isLeftButtonHandledByCursor);
127+
const shouldLook =
128+
this.isPointerLocked ||
129+
(!this.superHand.state.get("grab-start") && this.isLeftButtonDown && !this.isLeftButtonHandledByCursor);
128130
if (shouldLook) {
129131
this.look(e);
130132
}

0 commit comments

Comments
 (0)