chore: updated paddle sync code for server side by rewinding paddle
This commit is contained in:
parent
fcc5350b56
commit
80725f454f
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user