From 63687be41a4724392f4705c2ab094c0b3841c925 Mon Sep 17 00:00:00 2001 From: EgoMoose Date: Wed, 11 Dec 2024 00:32:07 +0000 Subject: [PATCH] (0.654.1.6540477) --- .../CameraModule/ClassicCamera.lua | 16 ++++++++--- .../CameraModule/Poppercam.lua | 27 ++++++++++++++----- .../CameraModule/ClassicCamera.lua | 16 ++++++++--- .../CameraModule/Poppercam.lua | 27 ++++++++++++++----- src/VersionInfo.json | 4 +-- wally.toml | 2 +- 6 files changed, 71 insertions(+), 21 deletions(-) diff --git a/src/PlayerModulePatched/CameraModule/ClassicCamera.lua b/src/PlayerModulePatched/CameraModule/ClassicCamera.lua index 7a978d3..00d7187 100644 --- a/src/PlayerModulePatched/CameraModule/ClassicCamera.lua +++ b/src/PlayerModulePatched/CameraModule/ClassicCamera.lua @@ -25,7 +25,7 @@ local FlagUtil = require(CommonUtils:WaitForChild("FlagUtil")) local FFlagUserFixCameraOffsetJitter = FlagUtil.getUserFlag("UserFixCameraOffsetJitter2") local FFlagUserCameraInputDt = FlagUtil.getUserFlag("UserCameraInputDt") - +local FFlagUserFixCameraFPError = FlagUtil.getUserFlag("UserFixCameraFPError") --[[ Services ]]-- local PlayersService = game:GetService("Players") @@ -202,12 +202,22 @@ function ClassicCamera:Update(dt) local cameraFocusP = newCameraFocus.p local newLookVector = self:CalculateNewLookVectorFromArg(overrideCameraLookVector, rotateInput) - newCameraCFrame = CFrame.new(cameraFocusP - (zoom * newLookVector), cameraFocusP) + + if FFlagUserFixCameraFPError then + newCameraCFrame = CFrame.lookAlong(cameraFocusP - (zoom * newLookVector), newLookVector) + else + newCameraCFrame = CFrame.new(cameraFocusP - (zoom * newLookVector), cameraFocusP) + end else -- is FollowCamera local newLookVector = self:CalculateNewLookVectorFromArg(overrideCameraLookVector, rotateInput) newCameraFocus = CFrame.new(subjectPosition) - newCameraCFrame = CFrame.new(newCameraFocus.p - (zoom * newLookVector), newCameraFocus.p) + Vector3.new(0, cameraHeight, 0) + + if FFlagUserFixCameraFPError then + newCameraCFrame = CFrame.lookAlong(newCameraFocus.p - (zoom * newLookVector), newLookVector) + else + newCameraCFrame = CFrame.new(newCameraFocus.p - (zoom * newLookVector), newCameraFocus.p) + Vector3.new(0, cameraHeight, 0) + end end local toggleOffset = self:GetCameraToggleOffset(timeDelta) diff --git a/src/PlayerModulePatched/CameraModule/Poppercam.lua b/src/PlayerModulePatched/CameraModule/Poppercam.lua index aeaa007..5b8eb0d 100644 --- a/src/PlayerModulePatched/CameraModule/Poppercam.lua +++ b/src/PlayerModulePatched/CameraModule/Poppercam.lua @@ -3,7 +3,11 @@ Poppercam - Occlusion module that brings the camera closer to the subject when objects are blocking the view. --]] +local CommonUtils = script.Parent.Parent:WaitForChild("CommonUtils") +local FlagUtil = require(CommonUtils:WaitForChild("FlagUtil")) + local ZoomController = require(script.Parent:WaitForChild("ZoomController")) +local FFlagUserFixCameraFPError = FlagUtil.getUserFlag("UserFixCameraFPError") local TransformExtrapolator = {} do TransformExtrapolator.__index = TransformExtrapolator @@ -87,12 +91,23 @@ function Poppercam:Enable(enable) end function Poppercam:Update(renderDt, desiredCameraCFrame, desiredCameraFocus, cameraController) - local rotatedFocus = CFrame.new(desiredCameraFocus.p, desiredCameraCFrame.p)*CFrame.new( - 0, 0, 0, - -1, 0, 0, - 0, 1, 0, - 0, 0, -1 - ) + local rotatedFocus = nil + if FFlagUserFixCameraFPError then + rotatedFocus = CFrame.lookAlong(desiredCameraFocus.p, -desiredCameraCFrame.LookVector)*CFrame.new( + 0, 0, 0, + -1, 0, 0, + 0, 1, 0, + 0, 0, -1 + ) + else + rotatedFocus = CFrame.new(desiredCameraFocus.p, desiredCameraCFrame.p)*CFrame.new( + 0, 0, 0, + -1, 0, 0, + 0, 1, 0, + 0, 0, -1 + ) + end + local extrapolation = self.focusExtrapolator:Step(renderDt, rotatedFocus) local zoom = ZoomController.Update(renderDt, rotatedFocus, extrapolation) return rotatedFocus*CFrame.new(0, 0, zoom), desiredCameraFocus diff --git a/src/PlayerModuleUnpatched/CameraModule/ClassicCamera.lua b/src/PlayerModuleUnpatched/CameraModule/ClassicCamera.lua index 7a978d3..00d7187 100644 --- a/src/PlayerModuleUnpatched/CameraModule/ClassicCamera.lua +++ b/src/PlayerModuleUnpatched/CameraModule/ClassicCamera.lua @@ -25,7 +25,7 @@ local FlagUtil = require(CommonUtils:WaitForChild("FlagUtil")) local FFlagUserFixCameraOffsetJitter = FlagUtil.getUserFlag("UserFixCameraOffsetJitter2") local FFlagUserCameraInputDt = FlagUtil.getUserFlag("UserCameraInputDt") - +local FFlagUserFixCameraFPError = FlagUtil.getUserFlag("UserFixCameraFPError") --[[ Services ]]-- local PlayersService = game:GetService("Players") @@ -202,12 +202,22 @@ function ClassicCamera:Update(dt) local cameraFocusP = newCameraFocus.p local newLookVector = self:CalculateNewLookVectorFromArg(overrideCameraLookVector, rotateInput) - newCameraCFrame = CFrame.new(cameraFocusP - (zoom * newLookVector), cameraFocusP) + + if FFlagUserFixCameraFPError then + newCameraCFrame = CFrame.lookAlong(cameraFocusP - (zoom * newLookVector), newLookVector) + else + newCameraCFrame = CFrame.new(cameraFocusP - (zoom * newLookVector), cameraFocusP) + end else -- is FollowCamera local newLookVector = self:CalculateNewLookVectorFromArg(overrideCameraLookVector, rotateInput) newCameraFocus = CFrame.new(subjectPosition) - newCameraCFrame = CFrame.new(newCameraFocus.p - (zoom * newLookVector), newCameraFocus.p) + Vector3.new(0, cameraHeight, 0) + + if FFlagUserFixCameraFPError then + newCameraCFrame = CFrame.lookAlong(newCameraFocus.p - (zoom * newLookVector), newLookVector) + else + newCameraCFrame = CFrame.new(newCameraFocus.p - (zoom * newLookVector), newCameraFocus.p) + Vector3.new(0, cameraHeight, 0) + end end local toggleOffset = self:GetCameraToggleOffset(timeDelta) diff --git a/src/PlayerModuleUnpatched/CameraModule/Poppercam.lua b/src/PlayerModuleUnpatched/CameraModule/Poppercam.lua index aeaa007..5b8eb0d 100644 --- a/src/PlayerModuleUnpatched/CameraModule/Poppercam.lua +++ b/src/PlayerModuleUnpatched/CameraModule/Poppercam.lua @@ -3,7 +3,11 @@ Poppercam - Occlusion module that brings the camera closer to the subject when objects are blocking the view. --]] +local CommonUtils = script.Parent.Parent:WaitForChild("CommonUtils") +local FlagUtil = require(CommonUtils:WaitForChild("FlagUtil")) + local ZoomController = require(script.Parent:WaitForChild("ZoomController")) +local FFlagUserFixCameraFPError = FlagUtil.getUserFlag("UserFixCameraFPError") local TransformExtrapolator = {} do TransformExtrapolator.__index = TransformExtrapolator @@ -87,12 +91,23 @@ function Poppercam:Enable(enable) end function Poppercam:Update(renderDt, desiredCameraCFrame, desiredCameraFocus, cameraController) - local rotatedFocus = CFrame.new(desiredCameraFocus.p, desiredCameraCFrame.p)*CFrame.new( - 0, 0, 0, - -1, 0, 0, - 0, 1, 0, - 0, 0, -1 - ) + local rotatedFocus = nil + if FFlagUserFixCameraFPError then + rotatedFocus = CFrame.lookAlong(desiredCameraFocus.p, -desiredCameraCFrame.LookVector)*CFrame.new( + 0, 0, 0, + -1, 0, 0, + 0, 1, 0, + 0, 0, -1 + ) + else + rotatedFocus = CFrame.new(desiredCameraFocus.p, desiredCameraCFrame.p)*CFrame.new( + 0, 0, 0, + -1, 0, 0, + 0, 1, 0, + 0, 0, -1 + ) + end + local extrapolation = self.focusExtrapolator:Step(renderDt, rotatedFocus) local zoom = ZoomController.Update(renderDt, rotatedFocus, extrapolation) return rotatedFocus*CFrame.new(0, 0, zoom), desiredCameraFocus diff --git a/src/VersionInfo.json b/src/VersionInfo.json index f219e7e..074a961 100644 --- a/src/VersionInfo.json +++ b/src/VersionInfo.json @@ -1,4 +1,4 @@ { - "version": "0.651.0.6510833", - "guid": "version-e0a840597ded474b" + "version": "0.654.1.6540477", + "guid": "version-b8e18f8286604778" } \ No newline at end of file diff --git a/wally.toml b/wally.toml index 0bd714b..dfdcaee 100644 --- a/wally.toml +++ b/wally.toml @@ -1,6 +1,6 @@ [package] name = "upliftgames/playermodule" -version = "651.0.6510833" +version = "654.1.6540477" registry = "https://github.com/UpliftGames/wally-index" realm = "shared"