I have OrbitControls enabled on my camera. However, I need a way to be able to instantaneously freeze/stop the camera rotation at any point.
cameraControls: function(val) {
this.controls.rotateSpeed = val ? 1 : 0;
this.controls.enabled = val;
this.controls.enableRotate = val;
}
test.cameraControls(false);
This only stops the controls from further rotation. But if my camera is still rotating and decelerating as a result of a recent mouse drag, it still continues to rotate until fully decelerated.
What I need is a way to instantly stop the rotation exactly where it is, the moment I call the function. I thought setting rotateSpeed to 0 would help, but it doesn’t.