Top-Down Multiplayer Movement Replication Issue

Hello,
Im trying to adapt the topdown blueprint template for multiplayer experience !
The screenshot you see is the graph editor for the topdowncontroller attached to the character (replicate and replicate movement are activated on the character)

If i launch 1 client and 1 server
when i left click on server side my character trigger the MoveTo node
When i left click on the client side i can see the draw sphere debug only on the server side but the character doesnt move in client side and neither in server side !
Have you any idea to help me to let the player move
Thanks in advance for your time

We need to see inside the MoveTo function.

you dont need the StopMovement function and its not called on server anyway.

also i assume triggered is set to fire once? you dont want to call that function on tick

1 Like

Hello,
Thanks for your answer,

Here is the inside of the MoveTo function

“also i assume triggered is set to fire once? you dont want to call that function on tick”
Sorry Im a real beginner on ue5 and i dont understand your question here but its an input action thats all i know and i want the character move all the path the second i click left ! i dont want stay clicked for that. I hope im clear ^^

Allright here is the things you should fix,

  • Server_MoveTo : Set it to multicast. You want it to be run on all clients.
  • IA_SetDestination_Click : Move Trigger connection to Started
  • IA_SetDestination_Click : Move Started Pin (Stop Movement) to cancelled, cause you don’t have to stop movement, when destination reached it will stop anyway. However you want to stop when cancelled.
  • IA_SetDestination_Click : I am not sure why you have 2 connection going to again Server Move To on cancelled and completed. In my opinion you don’t need those. You are checking a treshold time, you don’t need those too. If you want delayed trigger you can do it already from the input asset itself.

Let us know

Edit :

negative, movement should be done on server only and the actor should replicate movement.

try using AIMoveTo on your possessed pawn.

ive not used SimpleMoveTo but i wonder if there is a problem with having the server controller move a player controlled pawn…

What exactly negative?

I understand that replication of movement on server however a MoveTo is being done which is AI movement.

Maybe you are right, we should ask first if its player movement or not.

to the multicast, it should just be RunOnServer.
Of course AI only exists on server anyway which could be the problem

Could be. Could be navmesh missing in level so that AI doesn’t moves too.

@tzanou If you will use MoveTo node which is AI node make sure you have a NavMeshBoundsVolume added to your level covering walking terrain.

Thanks for this idea but i already try that and its also not working like that i think @Auran131 is right i dont need to ask the server at all !

Note that if I use a “Follow” node instead of MoveTo (which itself is inside a SimpleMoveToDestination), it works! I have the impression that the server doesn’t like MoveTo, so I did—as shown in my screenshot—a replication of the follow logic and hooked that into the Tick event. But I find that much less clean than a simple MoveTo! What do you think? Do you have any idea how to get simpleMoveToLocation to work?

@RedGrimnir I have a navMeshBound added to my level

1 Like

Here is the Main

Nice work! AIMoveTo is AINode correct way of doing it player follow or SimpleMoveTo. Which will already replicate movement over network since player movement already networked.

I Find why Move To was not working on server i just had to activate runtime generation to dynamic in Project settings > Engine > Navigation Mesh > Runtime Generation = Dynamic and Voila :smiley:

Edit : You dont need at all for movement character to add custom server event to make it work

1 Like