I have a camera system that uses tweens who can rotate at the player’s axis , the problem is that when the camera needs to move to -90 degrees the tween takes the longest way
local function cameraRot()
local rotTweenCameraInfo = TweenInfo.new(
0.075,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
-1,
false,
0
)
local rotGoal = Vector3.new(-45, CameraPartRotY, 0)
local rotTweenCamera = TweenService:Create(CameraPart, rotTweenCameraInfo, {Orientation = rotGoal})
rotTweenCamera:Play()
end
local function cameraPos()
if CameraCycle == -1 then
CameraCycle = 3
end
if CameraCycle == 0 then
CameraPartPosX = 10
CameraPartPosY = 0
CameraPartRotY = 90
end
if CameraCycle == 1 then
CameraPartPosX = 0
CameraPartPosY = -10
CameraPartRotY = 180
end
if CameraCycle == 2 then
CameraPartPosX = -10
CameraPartPosY = 0
CameraPartRotY = -90
end
if CameraCycle == 3 then
CameraPartPosX = 0
CameraPartPosY = 10
CameraPartRotY = 0
end
if CameraCycle >= 4 then
CameraCycle = 0
end
local tweenCameraInfo = TweenInfo.new(
0.075,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
-1,
false,
0
)