I want to do something conditionally based on the player being zoomed to the maximum out (I have CameraMaxZoomDistance set to 18).
Right now, I have this line:
if (camera.CoordinateFrame.p - character.Head.Position).magnitude > 17 then
This works normally (more or less). However, it doesn't work if there's some object in the way of the camera. Since ROBLOX bumps the camera in so that you can't see through objects, the distance reported by this calculation is much less than the "natural" or "extended" camera distance which it will grow to in open space.
Is there any way to guess / calculuate that full distance or other workaround to estimate it?
It would also be nice since every few frames it seems like there can be a bit of delay and the camera will be reported slightly closer or farther than the range it's supposed to be (even in open space)

2 comments
I'm not sure if I understand what is being asked, but when the camera is at the max zoom distance, it should never go over it. It's automatic.
No, but it can go under it, because of objects in the way of the camera.