-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OrbitControls meddles with camera after disabled #19917
Comments
Setting Interestingly, not all control classes are implemented that way. three.js/examples/js/controls/FirstPersonControls.js Lines 227 to 229 in ff0a90c
I think it's okay adding this line in |
@Mugen87 is correct. However, disabling Worse, disabling I think this is something you need to handle at the app-level. Also, |
Well, one could expect that this the exact behavior if It makes probably sense to improve the docs so they state |
After some testing, user code could actually break if the behavior is changed. Against this backdrop, I vote to just clarifying the docs and not changing |
Description of the problem
I was trying to manually set camera to a position and lookat target and disable control. However the disable does not seem to really shut down control from meddleing with the camera, unless I also set the control's target to be the same as the new camera's lookat target, it will update the camera.
Sample code:
Possible cause that I guess:
I have a mainloop calback that keeps calling orbitControls.update() for inertia animation, my guess is that the update function meddles with camera and does not respect that enabled=== false setting.
I found the cure is to add this:
I guess my main complaint is that I did not expect orbitControls to be able to change camera at all, after setting disabled. Including setting target, or calling update.
Three.js version
r118
Browser
OS
The text was updated successfully, but these errors were encountered: