Closed lovelle-cardoso closed 1 year ago
Nice job! I have wanted this for some time but never took the time to implement it. It has a bug though, if "enableDamping" is set to false it doesn't work at all.
Nice job! I have wanted this for some time but never took the time to implement it. It has a bug though, if "enableDamping" is set to false it doesn't work at all.
@jnsmalm You're right! I think I've fixed it. Check if it works now.
You're right! I think I've fixed it. Check if it works now.
Seems to work fine now!
@jnsmalm All right so I've moved the clamping and damping logic to updateCamera. X angle should be properly clamped now.
Thanks a lot!
(Also added autoUpdate and camera accessor properties so these can be changed after instantiation. It's a small change, but I can separate it out into another PR if necessary.)
Our engine runs on both desktop and mobile devices so I needed CameraOrbitControl to support touch screen events.
To test: