--[[
	(Yields) Animates camera to go back to the original position of the player's Humanoid.
]]

function CameraModule:animateToHumanoidAsync()
	self.camera.CameraType = Enum.CameraType.Scriptable

	-- We assume that the humanoid does not move after initial transition into the canvas camera position
	local target = self.initialCFrame

	if not target then
		warn("Initial CFrame not set, will animate to a default camera position behind the player")
	end

	self:_tweenCamera(target)

	self.initialCFrame = nil
	self.surfaceGui = nil

	-- Reset camera back to custom type
	self.camera.CameraType = Enum.CameraType.Custom
end
