If ArcRotateCamera.upperRadiusLimit
is set, then it is not possible to zoom out beyond the limit. But you can zoom in, until you pass (0,0,0), and then start zooming out. Then the limit is no longer applicable.
To reproduce:
- Go to https://playground.babylonjs.com/#SRZRWV#510
- Zoom in until you pass red plane
- and then start zooming out.
You will notice that you can zoom out beyond the upperRadiusLimit (set to 20)
This is because once you’ve passed zero, you’re now decreasing the number.
Notice how as I pass zero and keep going the radius becomes a negative number.
You would also need to set the lowerRadiusLimit to -20 to have the same affect once you pass the red plane.
You can see it fixed here:
https://playground.babylonjs.com/#SRZRWV#511
Hope this makes sense.
1 Like
It does. However I did not expect negative values.
But I checked that indeed it is possible (Spherical coordinate system - Wikipedia):
It is also convenient, in many contexts, to allow negative radial distances, with the convention that is equivalent to for any r, θ, and φ. Moreover, is equivalent to .
I learned something new. Thank you @PirateJC .
PS. Perhaps it is worth to mention this in the documentation to ArcRotateCamera.upperRadiusLimit
?
1 Like
Good call, I’ll look for a place to add it in as a special note.
1 Like