How do you instantly stop/freeze OrbitControl's effect on camera rotation?

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;

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.

You you use vanilla JS, this might help a bit:

So the only way to stop it dead is to kill it completely :laughing: Gross, but thanks!

1 Like

I’m not aware of any other method besides modifying the source code of the OrbitControls.js itself.