The problem is that the camera goes sideways while walking to left or right (in some cases also while moving forward or backwards)
Thats all, thank you!
I haven’t noticed anything wrong with mine, it’s hard to tell in that vid cos of the lag but it’s only like that when I’m recording. I’m not really sure why that’s happening cos it’s my first time using Lerp, I kinda just followed the video and I’m only as far that, but here’s a part of the code that uses it, If you want to see the whole code, just lmk and I’ll send it.
RunService.RenderStepped:Connect(function()
local rot = camera.CFrame:ToObjectSpace(lastCameraCF)
local X,Y,Z = rot:ToOrientation()
swayCF = swayCF:Lerp(CFrame.Angles(math.sin(X) * currentSwayAMT, math.sin(Y) * currentSwayAMT, 0), .1)
lastCameraCF = camera.CFrame
for i,v in pairs(camera:GetChildren()) do
if v:IsA("Model") then
v:SetPrimaryPartCFrame(camera.CFrame * swayCF * aimCF)
end
end
if isAiming and framework.viewmodel ~= nil and framework.module.canAim then
local offset = framework.viewmodel.AimPart.CFrame:ToObjectSpace(framework.viewmodel.PrimaryPart.CFrame)
aimCF = aimCF:Lerp(offset, .1)
currentSwayAMT = aimSwayAMT
else
local offset = CFrame.new()
aimCF = aimCF:Lerp(offset, framework.module.aimSmooth)
currentSwayAMT = swayAMT
end
end)
You can test it if you want to see if I have the same issue and just missed it or something: