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.
This commit is contained in:
parent
05b67445d1
commit
07ac5baeba
|
|
@ -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
|
||||
Loading…
Reference in New Issue