Multiplayer/Networking with a navigation system

Hello guys and sorry if I’m asking a “stupid question” but I’ve searched through the hub and the forum and there are couple of similar questions but no answers.

So I’m taking the TopDown Blueprint template and trying to make the multiplayer work. In this template the character is moved by clicking on the plane where it basically boils down to the SimpleMoveToLocation() function call with the “goal parameter” of the mouse click position.
My idea for networking was: send a custom event to the server with a mouse hit location, move the charcter on the server and let it replicate itself to the clients. Here how it looks like:

For the most part it’s the same as in the template. So now comes the strange part:

I see the differences in server and client behavior when running with two clients (NO dedicated server). While server movement/rotation/animation gets replicated perfectly, client does not replicate it’s rotation or animation and movement is slow and jittery. Can someone please give me a hint on why is that??? Both client and server movements are running on the server and replicate themselves to the client. But the server movement works and the client movement doesn’t. I can’t wrap my head around that. It seems like there is smth. basic about the replication that I misunderstand.

I wish I could help, but same issue as you saw.

All the other templates replicate movement pretty well, but this one seems like you have to manually replicate location, rotation, and I suppose animations. But that still doesn’t explain the slowness of movement.

I am having the same issue and I have not found a solution yet. I looked at the source code and I believe the problem is that location and rotation are not values that replicate. Only changes in location and rotation are replicated. I believe this has to do with the movement prediction system that runs on the clients. In the other templates, the “Add” functions are being used for movement, whereas in the top down template it uses Simple Move to Location. I wish they would upgrade the Top Down template to replicate movement since doing it manually will mean we don’t get the prediction system and the movement will be choppy. If you find a solution for this, please let me know. This issue makes the Top Down template unusable.

In a similar post Does UE4 have client-side prediction built in? - Multiplayer & Networking - Epic Developer Community Forums Zak Middleton from STAFF promised to provide some clarification about it. Stay tuned :wink:

Try This:

Don’t suppose you managed to fix the problem?

This worked for me.

Thank you, very helpful. Although now it walks only as long as I hold mouse which makes sense because of how Controller is build there with checking Pressed/Released. I am wondering if it’s possible to somehow easily check for Click and with the same InputAction node and do Move to Location instead. Do I need to manually setup some timer that check how long was the button pressed?

After commenting on this thread over 2 years ago, I found the proper solution. The trick is to setup an AI to move your Character and then when you click a location the player controller sends that point to the AI to move to that position. It then keeps moving without you holding down the mouse button. Since the AI moves the Character on the server, this method automatically works for network play and is replicated to all clients. It would be nice if Epic modified the Top Down template to use this method, since they have said in the past that this is how they would handle the issue. Maybe I will put together an alternate top down template project that people can use that starts with network/multiplayer support.

Yes, that would be great to have a network ready TopDown example as it’s rather confusing part since most of other templates are working over network out of the box.

This is exactly what i was looking for since “Simple move to location” will not work as expected on clients, thanks very much

Hi, I want to know if you still have the solution because when i click on that URL it redirects me to:

Bending geometry thread.