I’d the camera movement to be more fluid. As shown here in Unity Smooth Camera Follow in Unity - Tutorial - YouTube. I’ve looked all around for a solution and, while I’ve found some information pertaining to lerping and camera interpolation, those tend to relate to cutscenes rather than gameplay. I’d like to know if this type of camera movement is possible and if so, how can it be achieved? This is the current code I’m working with, it’s just the isometric camera script that ROBLOX provides on the dev wiki.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local CAMERA_DEPTH = 100
local HEIGHT_OFFSET = 2
camera.FieldOfView = 20
local function updateCamera()
local character = player.Character
if character then
local root = character:FindFirstChild("HumanoidRootPart")
if root then
local playerPosition = root.Position + Vector3.new(0, HEIGHT_OFFSET, 0)
local cameraPosition = playerPosition + Vector3.new(CAMERA_DEPTH, CAMERA_DEPTH, CAMERA_DEPTH)
camera.CFrame = CFrame.lookAt(cameraPosition, playerPosition)
end
end
end
RunService:BindToRenderStep("IsometricCamera", Enum.RenderPriority.Camera.Value + 1, updateCamera)