so i was tryna to make a 2d fightning game but idk how to make the camera move and size. this is my current script
local player = game:GetService("Players").LocalPlayer
local camera = game:GetService("Workspace").CurrentCamera
player.CharacterAdded:Wait()
player.Character:WaitForChild("Head")
camera.CameraSubject = player.Character.Head
camera.CameraType = Enum.CameraType.Attach
camera.FieldOfView = 20
game:GetService("RunService").Stepped:Connect(function()
camera.CFrame = CFrame.new(player.Character.PrimaryPart.Position) * CFrame.new(0,0,60)
end)
EVALDOL
(catstealer83)
2
Where do you want the camera to move?
1 Like
like 2 fighter is on the screen but there far away , and the camera will move to resize until it fit
EVALDOL
(catstealer83)
4
Maybe making FOV change to the distance between two players.
EVALDOL
(catstealer83)
5
Or making a camera part that will go back by the distance
how should i make that my game is like a fighting game that u can choose a character and fight with it
EVALDOL
(catstealer83)
7
Knowing the players that fight.
Calculate the distance between their character and change FOV to this distance(experiment with the values)