Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there anyway to tell the camera zoom distance?

Asked by
ItsMeKlc 235 Moderation Voter
8 years ago

Is there anyway to tell the camera's current zoom distance?

1 answer

Log in to vote
1
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
8 years ago

Yes, actually! It's the distance from their Head to their Camera:

--Obviously, this only works in a LocalScript.
local camera = workspace.CurrentCamera

local zoomDistance = (game.Players.LocalPlayer.Character.Head.Position - camera.CFrame.p).magnitude
Ad

Answer this question