Hello,
I am still struggling a bit with how to be able to zoom to a models surface but not have the camera go “through” an object. ( clipping ).
I I just limit the zoom to the bounding box
I have the problem that depending on the model shape some areas can be zoomed to the surface, while others remain far away even at highest zoom.
Maybe the ArcRotateCamera is not the right tool for that?
Sure.
Check: https://www.babylonjs-playground.com/#ZFPAHV#11
What I would like to achive is to be able to fly / zoom into the pot if accessed from the open top side and watch the bottom up close but not be able to clip through the sides.
So it sounds like you’re planning on changing the radius of the arcRotate camera based on some type of user interaction, but then you want to avoid colliding through the walls of the “pot.”
There’s a bunch of different ways you could go about something like this, but off the top of my head, I’d probably dig into raycasting and using the distance property of pickingInfo to set the radius of the arcRotate camera.
Basically cast a ray every frame that grabs the distance from the camera to an object, and then make sure it stays above a certain value.