yomotsu / camera-controls

A camera control for three.js, similar to THREE.OrbitControls yet supports smooth transitions and more features.
https://yomotsu.github.io/camera-controls/
MIT License
1.99k stars 253 forks source link

fix: reset focal offsets on input start and setLookAt #507

Open CodyJasonBennett opened 4 months ago

CodyJasonBennett commented 4 months ago

Fixes #303 Fixes #316 Fixes #424 Fixes #491

Applies and zeroes focal offsets into the control's spherical coordinates so features like zoom-to-cursor (e.g. setOrbitPoint and then interacting with an OrthographicCamera) and setLookAt work without interruption. I have not tested setLookAt as thoroughly, but expanded the fix to it after reading #303.

yomotsu commented 4 months ago

Sorry for the delay... I believe I should check the changes carefully; however, I currently have limited time to do so. A bit more time would be very helpful...

CodyJasonBennett commented 4 months ago

No worries. These are sweeping changes, and people can work around it if they really want to today.