Is there any way you could set up a playground that shows off the issue you have? It’s always much easier to troubleshoot when we can look at some code with you!
If I’m understanding you correctly, it sounds like you’re able to zoom the camera outside of the photosphere and you’d like to limit that effect so that the camera always stays within the sphere? Am I understanding the problem correctly?
If so, it would also be helpful to know what type of camera you are using. There are limit properties that you can set on cameras to have control over this very thing.
Using the Arc Rotate Camera as an example, by limiting the “upperRadiusLimit” property, you can specify how far out the camera should be able to zoom out.
Here are a couple of handy docs to check out:
Hope that helps answer your question.