chore: updated paddle sync code for server side by rewinding paddle

This commit is contained in:
Syntriax 2025-07-20 20:24:48 +03:00
parent fcc5350b56
commit 80725f454f

View File

@ -77,6 +77,8 @@ public class Paddle(Keys Up, Keys Down, float High, float Low, float Speed) : Be
public void OnServerPacketArrived(IConnection sender, PaddleKeyStatePacket packet)
{
physicsEngine2D.StepIndividual(rigidBody, -sender.Ping.Min(.05f));
isUpPressed = packet.IsUpPressed;
isDownPressed = packet.IsDownPressed;