I’m using a renderstepped event to lerp my aim cframe, but there is visible chopiness to the aim movement. Any help?
My Script
local pos = (cam.CFrame.Position - (viewmodel.AimPoint.Position - viewmodel.PrimaryPart.Position))
local cf = CFrame.new(pos) * CFrame.fromEulerAnglesXYZ(cam.CFrame:ToEulerAnglesXYZ())
viewmodel.PrimaryPart.CFrame = cam.CFrame:Lerp(cf, game.ReplicatedStorage.Values.AimAlpha.Value)
viewmodel.PrimaryPart.FakeCamera.Enabled = true
Additional video evidence of what happens.
Try changing this game.ReplicatedStorage.Values.AimAlpha.Value
to just a number like 0.1
or 0.2
astrozzyz
(astrozyz)
March 23, 2022, 4:26am
#3
Are you doing this in a RunService.HeartBeat
function? You should consider using this if you arent as this event fires every frame. If ran on the client it can make movements smooth
http_shawn
(http_shawn)
March 25, 2022, 11:05pm
#4
Yes, it’s in a local script and im using RunService.RenderStepped which runs before every frame is rendered.
http_shawn
(http_shawn)
March 25, 2022, 11:06pm
#5
I tried this but got the same result. Why should I change it to a lower number?