function CameraModule.getSpotPosition(k,Q,c)local s=Q.Adornee local i=Q.Face local K=c.AbsolutePosition+(Vector2.new(.5,.5)-c.AnchorPoint)*c.AbsoluteSize local r=(K-Q.AbsoluteSize/2)/Q.PixelsPerStud local e=s.CFrame:PointToWorldSpace(k:_getPointByFace(r,s,i))return e end function CameraModule._tweenCamera(c,Q)local k=constants.CameraTweenTime local s=TweenInfo.new(k,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)local i=c.tweenService:Create(c.camera,s,{CFrame=Q})i:Play()task.wait(k)end
--[[
	Calculate the actual spot Frame position in studs by making use of adornee position.

	Parameters:
	- surfaceGui (SurfaceGui): SurfaceGui instance that the spot belongs to
	- spot (Frame): Frame instance representing a Spot

	Returns:
	- (Vector3): World position of the spot
]]
function CameraModule:getSpotPosition(surfaceGui, spot)
	local adornee = surfaceGui.Adornee
	local face = surfaceGui.Face

	-- Find offset of the spot's Frame from the center of the SurfaceGui (in studs)
	local spotCenter = spot.AbsolutePosition + (Vector2.new(0.5, 0.5) - spot.AnchorPoint) * spot.AbsoluteSize
	local guiOffset = (spotCenter - surfaceGui.AbsoluteSize / 2) / surfaceGui.PixelsPerStud

	-- Calculate the actual position of the center of spot (in studs)
	local spotPosition = adornee.CFrame:PointToWorldSpace(self:_getPointByFace(guiOffset, adornee, face))

	return spotPosition
end

function CameraModule:_tweenCamera(target)
	-- Animate to the spot
	local tweenTime = constants.CameraTweenTime
	local tweenInfo = TweenInfo.new(tweenTime, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
	local tween = self.tweenService:Create(self.camera, tweenInfo, { CFrame = target })

	tween:Play()

	task.wait(tweenTime)
end
