Hey! I am currently looking for a way to manipulate the Z axis in a more easier way than RenderStepped.
Why?
I feel the way we all use its a little complicated and i dont know if there is really a way to fix it.
I know this line of code (839-848) in the BaseCamera from the CameraModule is the responsible one of preventing me from changing the Z axis of the camera, So is there any way to modify it so it can also return the Z axis of the camera without renderSteppped, Like just doing a TweenService:Create() and modify the Z Axis? (Preventing it to reset it to 0)
function BaseCamera:CalculateNewLookCFrameFromArg(suppliedLookVector: Vector3?, rotateInput: Vector2): CFrame
local currLookVector: Vector3 = suppliedLookVector or self:GetCameraLookVector()
local currPitchAngle = math.asin(currLookVector.Y)
local yTheta = math.clamp(rotateInput.Y, -MAX_Y + currPitchAngle, -MIN_Y + currPitchAngle)
local constrainedRotateInput = Vector2.new(rotateInput.X, yTheta)
--Uses CFrame.new() which has zero Z axis roll
local startCFrame = CFrame.new(ZERO_VECTOR3, currLookVector) -- This resets the Z roll
local newLookCFrame = CFrame.Angles(0, -constrainedRotateInput.X, 0) * startCFrame * CFrame.Angles(-constrainedRotateInput.Y,0,0)
return newLookCFrame
end
Help would be appreciated - Thanks!