Set max and min zoom

I want to set a max and min zoom to prevent the model from disappearing when you zoom out too much.
I’m not using the maps, so when you zoom out, or pan too much away from the model, you loose it, and then it’s impossible to bring it back, because there is no landmarks to help you come back to where the model is.
I tried
viewer.scene.screenSpaceCameraController.maximumZoomDistance = 500;
It’s working for some model, not for others.

I looked at frustum far, but not sure how to use it.
How can I forbid to zoom out/in too much or pan out too far from the model please ?
Thanks for the help.

Hi there,

Besides properties of the screenSpaceCameraController, you can try the minimumPixelSize` property on the model like in this example.

Hope that helps!