Experience-Monks / orbit-controls

generic controls for orbiting a target in 3D
http://jam3.github.io/orbit-controls/
MIT License
110 stars 17 forks source link

Add invertInputRotate option #14

Closed mikehwagz closed 6 years ago

mikehwagz commented 6 years ago

This PR was motivated by the desire to have more control over orbit-controls behavior in the 360-image-viewer.

When using orbit-controls inside a panorama, the camera moves in the same direction as you drag your mouse. For our project, the desired behavior is opposite, which feels as if you are grabbing the environment and moving it.

The new option, invertInputRotate allows the user of the library to decide the behavior of the rotation. It is false by default to reflect the current behavior.

mattdesl commented 6 years ago

Thanks! I think this should also be possible just by passing a negative rotateSpeed, no?

mikehwagz commented 6 years ago

@mattdesl ah, of course 😂 thanks for the feedback. cheers 🍻