Given a model, how can I make sure that on zoom or rotation camera never goes inside the model and stays certain distance out of it? I was checking controls examples but cant figure out how to go about it.
To clarify: model is a large uneven 2D terrain with mountains, valleys and so on, so if a zoom target is behind a mountain- camera goes through the mountain. If I rotate with controls, I can go inside the mountain as well. Setting controls min distance won’t help in this case.