From 00c5de4f923bd121584c26c55d88b42976620195 Mon Sep 17 00:00:00 2001 From: Oliver-makes-code Date: Mon, 22 Jan 2024 12:16:27 -0600 Subject: [PATCH] Change velocity lerp to make it more consistent at varying frame rates --- Client/World/Entity/ControlledClientPlayerEntity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/World/Entity/ControlledClientPlayerEntity.cs b/Client/World/Entity/ControlledClientPlayerEntity.cs index e7574a7..6978465 100644 --- a/Client/World/Entity/ControlledClientPlayerEntity.cs +++ b/Client/World/Entity/ControlledClientPlayerEntity.cs @@ -63,7 +63,7 @@ public void Update(double delta) { rotation.x = MathF.PI/2; movement3d = new dvec2(0, rotation.y).RotationVecToQuat() * movement3d * 4; - var localVel = dvec2.Lerp(velocity.xz, movement3d.xz, 0.9); + var localVel = dvec2.Lerp(velocity.xz, movement3d.xz, 25 * delta); velocity = velocity.WithXZ(localVel); if (Keybinds.Jump.isPressed)