Pawn always gets reset to proper position which makes it laggy. Any Solution?

I overwrote the floatingpawnmovement component and make my own pawn with moving inputs and rpc like above. The problem is from the client side of view, the server side’s pawn move correctly, but when the client side move its pawn, it’s always faster than the server side, which makes it got reset by the server after the server respond to client(from client side of view the pawn always stepback when it moves). I guess that the client side prediction is the cause but I did not expect it to be this obvious even in local lan. The game demo is a 2d game so there are only two movement direction. I set the capsule and pawn replicated but not sure if it’s a proper setting.

There is no one right way to do this, it depends on your game. The owning client can send and recieve reliable or unreliable rpcs to/from the server. The server can have properties that are unreliably replicatated to the owning client. The server and client have separate copies of the pawn. It’s up to you how and what you want to synchronize, what you display on the client, and what the actual game mode uses. I suggest studying ACharacter which has typical settings for a first-person-shooter. Also watch Alex Forsythes unreal engine networking video if you have not already done so:

You can’t write the movement logic in Tick Component.
You have to look at the source code to find the correct location to do this stuff and there is a lot of learning involved. I would recommend using the Character Movement Component since it comes with more features like movement modes and is a bit more documented. In the case of the CMC, you would write the movement logic in the Phys* Functions.

I can tell you’ve looked at some source code since you are using SlideAlongSurface and SafeMoveUpdatedComponent but implementing movement in Tick is too primitive. This won’t be doing any Client-Side Prediction or Smooth Correction updates for you.

Even if you don’t think you’re game pawn is best represented by a Character + Character Movement Component, I still strongly recommend using the framework since networked movementing is built in (which is by far the hardest challenge of a multiplayer game)

If you want to learn more about the character movement component, check out the Youtube series I started on it: