diff --git a/Client/Camera/init.client.lua b/Client/Camera/init.client.lua index 764f7a5..83bf70c 100644 --- a/Client/Camera/init.client.lua +++ b/Client/Camera/init.client.lua @@ -2,11 +2,6 @@ local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Players = game:GetService("Players") -local playerScripts = script.Parent -local playerModule = require(playerScripts:WaitForChild("PlayerModule")) - -local cameraSystem = playerModule:GetCameras() - local main = require(script:WaitForChild("Main")) local popper = require(script:WaitForChild("Popper")) local opacity = require(script:WaitForChild("Opacity")) @@ -45,16 +40,12 @@ main:SetEnabled(true) opacity:SetEnabled(true) -- Overload the camera update function. -function cameraSystem:Update() - if cameraSystem.activeCameraController then - cameraSystem.activeCameraController:Enable(false) - cameraSystem.activeCameraController = nil - end - +local function update() main:Update() popper:Update() opacity:Update() + + RunService:UnbindFromRenderStep("cameraRenderUpdate") end -playerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Default) -playerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Default) \ No newline at end of file +RunService:BindToRenderStep("RetroCamera", 250, update) \ No newline at end of file diff --git a/Client/LensFlare.client.lua b/Client/LensFlare.client.lua index 05bfdf4..abcb6c5 100644 --- a/Client/LensFlare.client.lua +++ b/Client/LensFlare.client.lua @@ -135,4 +135,4 @@ local function update() lensFlareNode.Parent = nil end -RunService:BindToRenderStep("LensFlareUpdate", 201, update) \ No newline at end of file +RunService:BindToRenderStep("LensFlareUpdate", 1000, update) \ No newline at end of file diff --git a/Client/Moon/init.client.lua b/Client/Moon/init.client.lua index 7df7d1f..6ccc2d1 100644 --- a/Client/Moon/init.client.lua +++ b/Client/Moon/init.client.lua @@ -20,4 +20,4 @@ local function moonUpdate() end end -RunService:BindToRenderStep("MoonUpdate", 201, moonUpdate) \ No newline at end of file +RunService:BindToRenderStep("MoonUpdate", 1000, moonUpdate) \ No newline at end of file diff --git a/Client/Sky/init.client.lua b/Client/Sky/init.client.lua index ee5348d..13127e3 100644 --- a/Client/Sky/init.client.lua +++ b/Client/Sky/init.client.lua @@ -155,6 +155,6 @@ local function updateSky() end end -RunService:BindToRenderStep("UpdateSky", 201, updateSky) +RunService:BindToRenderStep("UpdateSky", 1000, updateSky) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/Client/SunRays/init.client.lua b/Client/SunRays/init.client.lua index deef011..c11585c 100644 --- a/Client/SunRays/init.client.lua +++ b/Client/SunRays/init.client.lua @@ -77,4 +77,4 @@ local function update() adorn.Parent = nil end -RunService:BindToRenderStep("SunRays", 201, update) \ No newline at end of file +RunService:BindToRenderStep("SunRays", 1000, update) \ No newline at end of file diff --git a/Player/FloorDrag.client.lua b/Player/FloorDrag.client.lua index cc04d23..ed9bd4f 100644 --- a/Player/FloorDrag.client.lua +++ b/Player/FloorDrag.client.lua @@ -45,16 +45,15 @@ local function update(dt) end local yVel = rootPart.Velocity.Y - local step = dt * stepRate if math.abs(yVel) > 8 then local goal = math.sign(yVel) - humanoid.HipHeight = moveTowards(humanoid.HipHeight, goal, step) + humanoid.HipHeight = moveTowards(humanoid.HipHeight, goal, stepRate * dt) elseif lastLevel ~= level then humanoid.HipHeight = math.sign(lastLevel - level) * math.clamp(dist - 3, 0, 1) lastLevel = level else - local decay = decayRate ^ (step * 60) + local decay = decayRate ^ (dt * 60) humanoid.HipHeight = humanoid.HipHeight * decay end end diff --git a/UI/Mouse/ClickToMove.client.lua b/UI/Mouse/ClickToMove.client.lua index 8cd591a..edfcfcf 100644 --- a/UI/Mouse/ClickToMove.client.lua +++ b/UI/Mouse/ClickToMove.client.lua @@ -72,7 +72,7 @@ local function isFinite(num) return num == num and num ~= 1/0 and num ~= -1/0 end -local function rotateCameraTowardsGoal() +local function rotateCameraTowardsGoal(dt) local camera = workspace.CurrentCamera if camera then @@ -87,7 +87,7 @@ local function rotateCameraTowardsGoal() if isFinite(angleBetween) then local abs = math.abs(angleBetween) local sign = math.sign(angleBetween) - local rotation = math.min(0.01, abs) + local rotation = math.min(dt * 6, abs) local cfLocal = focus:toObjectSpace(cf) camera.CFrame = focus * CFrame.Angles(0, -rotation * sign, 0) * cfLocal @@ -218,7 +218,8 @@ local function canRenderDisk(rendering) return false end -local function render3dAdorn() +local function render3dAdorn(dt) + local dt = math.min(0.1, dt) disk.Visible = canRenderDisk(true) if disk.Visible then @@ -233,7 +234,7 @@ local function render3dAdorn() if currentGoal then goalDisk.Visible = true goalDisk.CFrame = CFrame.new(currentGoal) * DISK_OFFSET - rotateCameraTowardsGoal() + rotateCameraTowardsGoal(dt) else goalDisk.Visible = false end