I am working on and fps game recently, but im having some issues with cframe.
i used RenderStepped and CFrame:Lerp to make a bouncing like weapon
but the problem is, cframe lerp “jitters” when used with renderstepped, can anyone help me with this?
the stutter is clearly visible whenever the player moves
this is the “stutter” im talking about
1 Like
This post could maybe help with your issue.
The first-person arm rig in my FPS project uses CFrame’s lerp method to create a swaying effect (lerp is called every frame in a RenderStepped function). It works nicely and I like its simplicity, but it always appears really jittery.
Here’s a gif displaying the jittery-ness I’m talking about. Hopefully you can see how the rig stutters across the screen.
Is there a good way to alleviate this jittering by lerping “better” or some other way?
I already read this thread but this one didnt got to a real solution.
Ince_FS
(Ince)
September 30, 2019, 5:54pm
#4
Maybe the best way to fix that is updating the lerp with the second value of Stepped
like this:
local Frame = CFrame.new()
local DT = .16
game:GetService("RunService"):BindToRenderStep("Test", Enum.RenderPriority.Camera.Value+1, function()
Frame = Frame:Lerp(CFrame.new(), DT*10)
_, DT = game:GetService("RunService").Stepped:Wait()
end)
1 Like
works but didnt really solve the stutter