Fishnet Version : 4.4.7R Pro
Hi !
how do you guys manage player going too far when using predicted inputs for Future states ?
For instance, my player keeps running left then right, other people sees my player kind of teleport, since I am predicting that if the lastMoveData = running, now he should be running again
I tried some lerping but observers still see me kind of teleport (see attached video)
public void ReplicateMovementBehaviour(PlayerMoveReplicateData md, ReplicateState state)
{
var currentVelocity = pC.rb2D.Rigidbody2D.linearVelocity;
var targetVelocity = new Vector2(
md.HorizontalInput * pC.playerMovementConfig.moveSpeed,
currentVelocity.y
);
pC.rb2D.Velocity(
Vector2.Lerp(
currentVelocity,
targetVelocity,
pC.playerMovementConfig.velocitySmoothing
)
);
}