0
votes

I am using Three.js with OrbitControls.js. Is there any way I can extend the functionality to implement a "move camera with middle mouse button pressed" feature? Which is known from 3d programs.

Alternatively it could also be a combination of holding down Shift and moving the mouse.

Goal is to give the users not only the cursors keys for navigation, i.e. repositioning the camera, but also a way by using the mouse.

I would like to implement this feature in this cube program.

1

1 Answers

2
votes

You already have that functionality with the standard TrackballControls, if I'm understanding correctly, just right click and drag. If you want to change that to middle mouse / shift look at the onMouseDown() function and copy the code you want into a middle mouse or shift key event.