Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrbitControls helper resets camera position when changing any attributes #950

Open
brennerm opened this issue Apr 22, 2024 · 0 comments
Open

Comments

@brennerm
Copy link

Hey, at first, thanks for building this great Three.js API for my favorite web framework. 馃檹

I started building with it a week ago and noticed something weird happening. Whenever I change any attribute (enabled, zoomSpeed, rotateSpeed, etc.) on the OrbitControls helper, the camera resets to its initial position. Initially I thought that's just how to underlying Three.js OrbitControls work but after I found no one else with the same issue online, I decided to to give the native OrbitControls a try. And et voila, the camera doesn't reset anymore.

So something in Threlte's OrbitControls helper seems to cause the reset. The issue is pretty easy to reproduce. Just go to the OrbitControls docs, rotate the camera and then change any of the provided settings, e.g. like zoomSpeed. The camera should reset.

Let me know if there's anything I can help with to get this fixed or maybe I'm missing something and this is the expected behaviour. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant