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

How can I position a camera to fully zoom in a brick?

Asked by
Seyfert 90
6 years ago
Edited 6 years ago

I have a block inside of a house that I want the player's camera to get zoomed in on completely and not allow the player to zoom out. I have noticed that the camera refuses to zoom in through the house in order to get to the brick that is inside.

Here is my code which is in a localscript

local player = game.Players.LocalPlayer
local camera = game.Workspace.Camera


script.Parent.MouseButton1Click:connect(function()
        camera.CameraSubject = game.Workspace.cameraFocus
        camera.CameraType = "Attach"
        camera.FieldOfView = 90
        camera.CFrame = CFrame.new(30,0,0)
        player.CameraMaxZoomDistance = 10

end)
0
game.Workspace.CurrentCamera vs. game.Workspace.Camera SebbyTheGODKid 198 — 6y
0
Thanks but that does not solve my issue. My issue is that the Camera is staying zoomed too far away from the brick, is there any way to set the camera to zoom in on the brick completely? Seyfert 90 — 6y
0
You could try using the Scriptable CameraType, or you could try gradually reducing the CameraMaxZoomDistance property of the player. mattscy 3725 — 6y

Answer this question