How to do smoothly begin a Moon Animator cutscene?

Currently i have this code to play a moon animator cutscene, it works good, the problem is, that the animation instantly begins, if you noticed, on some games, like tsb for example, the Camera cutscene smoothly transition to the first frame (i assume) , how could i do this?

local function Cinematic(CinematicsFolder)
	local CurrentCameraCFrame = workspace.CurrentCamera.CFrame
	local FrameTime = 0
	local Connection

	character.Humanoid.AutoRotate = false
	Camera.CameraType = Enum.CameraType.Scriptable
	
	Connection = RunService.RenderStepped:Connect(function(DT)
		FrameTime += (DT * 60) 

		local NeededFrame = CinematicsFolder.Frames:FindFirstChild(tonumber(math.ceil(FrameTime)))

		if NeededFrame then
			Camera.CFrame = Character.HumanoidRootPart.CFrame * NeededFrame.Value
		else
			Connection:Disconnect()
			character.Humanoid.AutoRotate = true
			Camera.CameraType = Enum.CameraType.Custom
			Camera.CFrame = CurrentCameraCFrame	
		end
	end)
	
end

note : this plays the cutscenes relative to the character

1 Like

You could introduce Lerp into your code to smoothly pan the camera to its target CFrame
You are using RenderStepped to so implementing this should be fairly simple

the problem with it is that if i lerp it, the animation custom easing styles won’t exactly be show, because the lerp overrides them, but i’ll try it

2 Likes

I tried lerping but i noticed it wasn’t giving me the result i needed , so in the end i just tweened to the first frame of the animation and then use the renderstepped loop