[Simple Move To Actor] - Why character movement not replicated for itself?

Hello,

I use node “Simple Move To Actor” and it’s work well. But one thing that character movement doesn’t work on client who fire that call while server or over network seem doing fine.

Could you tell me what is cause and how to solve it? Thank you

Movement on owner client
Movement on owner client

.
Movement over network client
Movement over network client

Are you components replicated properly? Select your pawn and check replication section. Replicates and Replicate Movement must be checked.

image

1 Like

Yes, and I think it’s default for character class

Replication should work out of the box with Third Person character. Probably you changed something, and without detailed examination, it’s hard to tell what.

Yes, as you see it’s replicated well on other client in network. I didn’t change anything, just use node “simple move to actor”

@Bojann Here is more detail: On owning client pawn capsule move but no rotation and velocity is 0

So, on your “Custom Event” that runs this code, should be called from your “Character Blueprint” and you click on your “Custom Event” and look to the right I think, and you’ll see an option that says “Replicated” and you choose “Run on server”. and your client should be able to move then :smiley: (oh and I doubt it would have to have “reliable” checked")

If you want to separate it more, you could fire “Custom event” have that run through a “Switch Has Authority Node” (Your Host would run through code that has “Authority” and the Client would run through the code the doesn’t). Then you could make a “Custom Event” run off where the Client code would go and make that “Replicated” as stated before, but this is extra steps if you’re just worrying about walking at the moment.

@OORTIZ

“Custom Event” in “Character Blueprint” choose “Run on server” have “reliable” checked


This does not work. When call that function on client, the controller on server will fire instead on client. That make character (not control by client) of server move. Even I test on virtual machine and connected via Steam. When replace node “Get Player Controller” with “Get Controller” will fix that issue. But then client not replicated movement. Only capsule move.


This will work fine when play in editor with enable “Allow Client Side Navigation” in Project Settings. But when testing on package, performance very bad (or because my potato pc).

So, I would definitely Unclick “Reliable” you don’t need it to be reliable. See there on your earlier post where you have “executes action” and its saying target is “Player Controller 0”. That will always be “Host”. Pass a “Player Controller Reference” From the “Character” (Must be owning client, in other words your the character BP). IE add an input to server event that handles the “Player Controller Reference” and feed it from your pawn. Pictures are better here




2 Likes

@OORTIZ I’m much appreciate that you take your time to help me. But this is work as intended even with “Reliable” disabled.

I was try your solution for me. It’ll make player 2 character move when call that on player 1 (play as client for both). And I think, “Get Player Controller” node should be index 0 over online or network game.