Using both fly controls and orbit controls together

Hi,

I’m trying to use both orbit controls and fly controls together, so that I can navigate around the scene with both keyboard and mouse.

But if I enable both of them at the same time, most of the key-presses end up not working, and the direction keys end up panning, instead of adjusting the camera.

If I make the controls an option, so that the user can choose to use only-fly, or only-orbit controls, switching between the tools breaks fly controls a similar way.

Has anyone done this sort of thing before?

Thanks.

Most controls are not designed so arbitrarily different controls can work together at the same time.

How are you switching between both controls? Please demonstrate your workflow with the following fiddle:

https://jsfiddle.net/8wbf3kny/

I’ve already included OrbitControls and FlyControls.

I’ve never seen this combination before. The problem is that FlyControls does not have an enabled property like many other controls since the class assumes it is not used next to other ones.