From 07ac5baebaf20826d8bbfa2a65d39d22f1f1dffc Mon Sep 17 00:00:00 2001 From: CloneTrooper1019 Date: Wed, 29 Apr 2020 23:04:43 -0500 Subject: [PATCH] Only use gyro rotation when zoomed close enough. Roblox's camera is still hijacking signals and tricking my camera into using first person mode when it isn't supposed to be. Trying to work around this. --- Player/GoofyMotion.client.lua | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Player/GoofyMotion.client.lua b/Player/GoofyMotion.client.lua index 36d5f21..b727b4b 100644 --- a/Player/GoofyMotion.client.lua +++ b/Player/GoofyMotion.client.lua @@ -33,13 +33,24 @@ spawn(function () end) local function update() + local zoom = (c.Focus.Position - c.CFrame.Position).Magnitude local rotationType = GameSettings.RotationType local seatPart = humanoid.SeatPart if rotationType.Name == "CameraRelative" and not seatPart then - local dir = c.CFrame.lookVector * xz - bg.CFrame = toRotation(dir) - bg.Parent = rootPart + local dir + + if zoom <= 1.5 then + dir = c.CFrame.lookVector + else + bg.Parent = nil + end + + if dir then + bg.CFrame = toRotation(dir * xz) + bg.Parent = rootPart + end + humanoid.AutoRotate = false else local state = humanoid:GetState() @@ -56,5 +67,6 @@ end humanoid.AutoRotate = false humanoid:SetStateEnabled("Climbing",false) -RunService.RenderStepped:connect(update) +RunService:BindToRenderStep("GoofyMotion", 400, update) + c.FieldOfView = 65 \ No newline at end of file