1

I am using Orthographic camera with OrbitControls and it works fine for zooming in and out (with mouse scrollwheel) and panning left and right (holding mouse right button down).

But I would also like to be able to "pan" the camera up & down (I believe the technical term is "boom" or "jib").

OrbitControls doesn't provide this motion.

What can I do to drive such a vertical motion from the mouse?

1 Answer 1

3

You can set which mouse buttons perform which action with OrbitControls.mouseButtons. It sounds like you already have rotating and dolly (AKA zoom in/out), but you still need to set the desired pan (up/down/left/right) button.

controls.mouseButtons = {
    LEFT: THREE.MOUSE.ROTATE,
    MIDDLE: THREE.MOUSE.DOLLY,
    RIGHT: THREE.MOUSE.PAN
}

Don't forget to also set the .screenSpacePanning property to either true or false, depending on what your desired behavior is. My guess is you want it set to true, but play with it to get the desired result.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the reply but Left/right panning was already working and it seems that OrbitControls does not provide up/down panning.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.