Like CameraMaxZoomDistance or CameraMinZoomDistance? Is there one for current zoom distance?
✓ ANSWER ACCEPTED
Is there a way to get how far the player is zoomed in or out?
1 answer
✓ Accepted answer
You can calculate it yourself!
Suppose that camera is the player's camera object, and head is the player's head (I'm skipping how we obtain them because it could vary depending on what you're doing).
To know how far apart they are, we'll find out where they are. The player's head will be at head.Position. The camera's position will be camera.CoordinateFrame.p since we want the position (p) of its CFrame (CoordinateFrame).
So to find the distance between them, subtract them. Then find the magnitude of the result.
Thus,
currentZoom = (camera.CoordinateFrame.p - head.Position).magnitude
This will be the distance (in studs) from the player's head (the origin of their camera) and their camera's location.
This discussion is preserved as it was. New answers, comments, and votes are closed.
