ArcRotateCamera block rotation but still be able to animate rotation


Got a problem with ArcRotateCamera.

I will like to lock the user from rotating it but I still want to be able to animate its rotation.

So Initialize the controllers like that:

camera.attachControl(canvas, undefined, undefined, 0);

and after I’m locking alpha and beta rotation with the limits.

But I need to take them down for animation and then set them back up. This approach is making errors when animations are rapid.

Animation onAnimationCompleat callback should add limits again to lock animation But with multiple animations end it’s always called and its result with no animation at all.

Can I block the camera from rotation in another way than just limits? Cause they do not work for me at the moment.


OK, I started animating: beta, lowerBetaLimit and upperBetaLimit at the same time with 3 separate Animations to one and the same value of beta. And it works

And I got a new question.

Is there a way to animate multiple camera values at the same time in a single animation call?


Yes you can, but providing a playground would help better understanding what you are trying to do.

Also in your case I wonder if you could simply attach detach control on demand to prevent extra user manipulations ?

I just need to lock alpha and beta rotation and be able to animate it.

Any starting playground with ArcCamera is my example.

If I attach and detach controls I will lose panning which I want.