Add movement input does not work on player pawn when used on serverside

, I noticed that Add movement input-command does nothing if pawn is possessed and you try to use command on serverside.

Workflow:

  1. Create first/third person project, use pawn that comes with it.
  2. Go to tick, add “has authority” branch
  3. if server → add movement input and use actors forward vector , use scalar value 1
  4. Run dedicated server

Problem: Pawn ignores movement input on tick. This does not happen if you are server/listener

Hi Kauppaneuvos,

Switch Has Authority node will only run branch from Authority output if it is Server. When you run your game as a Dedicated Server, player-possessed pawns are not run by Server, so that branch will never fire.

It sounds like you may not be familiar with Unreal Engine method of network communication, so here’s a couple of links that may be helpful:

and

Hope that helps!

How do you explain this then? Both messages get printed when i run this pawn blueprint when i possess pawn as a client on dedicated server.

http://i.imgur.com/R00D8JF.jpg

I can put every other function to serverside branch , add force, add impulse and everything and serverside does those functions, but if i add “Add movement input” , then it does nothing if pawn is possessed.

That is my problem.

Because character exists on both Server and Client, but Add Movement nodes require a controller. controller only exists where there is a player (which a dedicated server does not have) and it is not replicated. Server is running as much of that branch as it can on its version of that pawn, but gets hung up on Add Movement Input node. Does that make more sense?

I think there’s a feature request in to make Movement nodes work without a controller, but that’s unlikely to happen anytime soon.

Ah, i get it now, my mistake. Ty for explanation

This is a bit of a problem because complex movement requires more than a direct call to AddMovementInput. Like if I’m in cover, I can’t move forward so I need to check a bool. To put that logic on client isn’t secure or efficient. UE4 doing replication for us in AddMovementInput forces us to leave holes for hackers. Or is there an alternative?
Edit: I’m seeing that controller just calls back into pawn and pawn calls same internal code if Force is true. Still, setting Force to true doesn’t make character move. Guess there’s more to it.