Weapon Aim and Recoil Issue

Hello, I am facing an issue where weapon recoil is not visible when aiming.
It happens because I am constantly lerping the view model to gun’s physical sight object which neutralizes visible recoil.
I am asking for ideas to resolve this issue, maybe a completely different way to handle aiming and recoil?

if Camera.Sight then
    Camera.Sight.CFrame = Camera.Sight.CFrame:Lerp(_G.ViewModel.HumanoidRootPart.CFrame, _G.Values.AimAlpha.Value)
end
1 Like

Hey there! Rather than directly setting the camera CFrame to the sight part when aiming, perhaps you could use CFrame.LookAt to set the camera position to the sight position, but lerp the lookAt parameter from the camera position + current look vector to the camera position + sight look vector. This will give an aspect of realism and make the recoil visible. Try playing around with the alpha values and delta time to see what feels good.

P.S. For delta time, you could find an optimal lerp alpha through trial and error, and in your code, simply multiply that by (60 * dt).

1 Like