how to make camera like this?
Set the CameraType to Scriptable and find a CFrame that is a certain distance away from the player
Please develop, we cannot really help
You need to set CameraType to Scriptable and create a CFrame that is x away from the player, and decrease the player’s Field Of View.
This is actually quite simple! Here’s a rough draft of a LocalScript
you can put in StarterPlayer.StarterPlayerScripts
.
local Camera = workspace.CurrentCamera
Camera.FieldOfView = 30
local CameraDistance = 100
local RelativeAngle = Vector3.new(1, 1, 1) -- The vector from where the head will be viewed. Magnitude is not preserved.
-----
RelativeAngle = RelativeAngle.Unit * CameraDistance
Camera.CameraType = Enum.CameraType.Scriptable
local CurrentSubject
local function RefreshSubject()
local Subject = Camera.CameraSubject
if Subject and Subject:IsA("Humanoid") then
Subject = Subject.Parent:WaitForChild("Head", 1)
end
if Subject then
CurrentSubject = Subject
end
end
Camera:GetPropertyChangedSignal("CameraSubject"):Connect(RefreshSubject)
RefreshSubject()
game:GetService("RunService").RenderStepped:Connect(
function()
if CurrentSubject then
local SubjectPos = CurrentSubject.Position
Camera.CFrame = CFrame.lookAt(SubjectPos + RelativeAngle, SubjectPos)
end
end
)
RelativeAngle
represents the vector from where the head will be viewed from, with the distance being thrown in a few lines down from it. It’s not the most elegant way of getting an angle, but it works. It also doesn’t allow for zooming or any kind of camera rotation (though I suspect the whole purpose of this is so you can’t rotate the camera), so that is up to you to add in as well.
Here it is in action: https://gyazo.com/fd8112008e5af9998c06443b1b437739