x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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

Heya, I noticed that Add movement input-command does nothing if pawn is possessed and you try to use the 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 the server/listener

Product Version: UE 4.8
Tags:
more ▼

asked Jul 25 '15 at 05:58 PM in Bug Reports

avatar image

Kauppaneuvos
56 4 6 14

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Kauppaneuvos,

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

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

https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/Networking/TestMultiplayer/index.html#listenservervsstopdedicatedserver

and

https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Blueprints/index.html

Hope that helps!

more ▼

answered Jul 26 '15 at 04:31 PM

avatar image Kauppaneuvos Jul 26 '15 at 05:06 PM

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.alt text

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.

avatar image Ben Halliday STAFF Jul 26 '15 at 05:19 PM

Because the character exists on both Server and Client, but the Add Movement nodes require a controller. The controller only exists where there is a player (which a dedicated server does not have) and it is not replicated. The Server is running as much of that branch as it can on its version of that pawn, but gets hung up on the 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.

avatar image Kauppaneuvos Jul 26 '15 at 05:38 PM

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

avatar image Jin_VE Nov 15 '17 at 02:35 AM

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 the client isn't secure or efficient. UE4 doing the replication for us in AddMovementInput forces us to leave holes for hackers. Or is there an alternative? Edit: I'm seeing that the controller just calls back into the pawn and the pawn calls the same internal code if Force is true. Still, setting Force to true doesn't make the character move. Guess there's more to it.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question