Camera that rotates with no contstraints

I’m pretty sure this is something I’ve overlooked, but… I notice that when I have a model loaded up, I can spin it left to right or right to left indefinitely; however, when I try to do the same up and down there comes a stop point where the camera refuses to move.

Do we have a camera or setting for an ArcRotateCamera that will allow for continuous rotations in all directions?

Thank you!

Yes we do:
https://doc.babylonjs.com/api/classes/babylon.arcrotatecamera#lowerbetalimit

Thanks for the link, Delta.

I tried implementing it but am coming up with some weird happenings when I move the camera up or down. Up and down still doesn’t spin infinitely like the side to side movements, but its no longer locked as severely as before. The weird part is that the camera moves to a point then seems to jump to the opposite. I’m probably misunderstanding what I’m supposed to use for the input on the limit, but the documentation says an angle so I put 360 for max and 0 or .1 for min.

Here is the Playground for it

this is why we lock the camera to not be able to go down these values. As the camera has a Y up, it will try to always keep Y up and when you are at that limits, then the camera need to do a 180 rotation to keep Y up while looking at his target

Please also note that limit are in radians and not degrees (so 2PI and not 360)

I think what you need is no limit right? so everything set to null (and check line 18 (allowUpsideDown) to avoid the Y up constraint):
https://www.babylonjs-playground.com/#DRNC11#1

1 Like

yay thanks, that’s perfect. rats, i thought it was degrees. hehe i tried -1 instead of null, too. I shouldn’t have assumed considering the alpha and beta parameters in the ArcRotateCamera constructor. Thank you for the sample and explanation.

my pleasure!