Reputation: 41
Using a scene with OrbitControls
and as far as I can tell by default pressing the ctrl
and shift
key reverts the left and right mouse movements.
in my setup left mouse click rotatoes arounds the scene and right mouse clicks move around the 2d plain.
how can I disable the ctrl
and shift
key reversing that?
a hack I found is to edit the controls mouseButtons
back when the keys are pressed:
this.controls.mouseButtons = {
LEFT: shouldSwitch ? 2 : 0,
MIDDLE: 1,
RIGHT: shouldSwitch ? 0 : 2,
};
using r141
Upvotes: 3
Views: 1048
Reputation: 31076
OrbitControls
does not allow disable the processing of "control", "shift" and "meta" keys. You would need a custom modification and remove the following two sections:
Changing the mouse button configuration (OrbitControls.mouseButtons
) when one of the keys are pressed like suggested is also a valid solution.
Upvotes: 3