I am using OrbitControls for user navigation around the scene.
Now I would like to add some camera animation - on the same camera, or one that appears to be the same one by virtue of starting at the same place where the OrbitControls camera was. When the camera animation is complete, I want to user to be able to seamlessly go back to navigation in the scene using OrbitControls.
I think for this to work, I need to be able to set the azimuth and polar angle values for my OrbitControls object.
Is there a way to do that ?
There are not setters for the azimuthal and polar angles, only getters. These values are internally computed based on the event data and not intended to be set by the user.
If you still want to do this, you have to create a custom version of
OrbitControls and add both methods by yourself. When animating, you have to disable
OrbitControls (by setting the
enabled property to
false) and call
update() by yourself.
Thanks for your help.
There might be a way around - a bit dirty however
var orig =
orbitControls.minPolarAngle = orig
orbitControls.maxPolarAngle = orig