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"

Why is pawn not moving on server?

Hello,

I'm working on a blueprint multi-player game, testing it with a listen-server and one client.

I can not get the client-controlled pawn to move on the server. Now some details:

From all of the information I have gone through I gathered this: the suggested way of handling pawn movement in multi-player is to determine the details of the movement on the client and having the server execute the movement according to those details and replicate the movement to all clients. So the set-up is this:

The server spawns a pawn for each player/machine according some player info passed to the server by the clients. The pawns are then possessed by the respective player controllers, organized by the server.

The Pawns are of the "default pawn" class.

In the pawn blueprint I set up the movement as shown on the screenshot:

alt text

The whole thing works when I control the pawn on the listen server. I see it move around on the server machine and on the client. But it does not work the other way around. Which is so strange, because I thought with this set-up the Multicast means that the server carries out the movement for the client version (which it obviously does, the client pawn moves around), then why does it not work for the server version of the pawn?

I can get print-strings that are instigated on the client to show on the server with an event set to "run on server" so I assume I can actually trigger an event on the server from the client, but the pawn does not want to move with a similar set-up either.

Another set-up I tried was to trigger an event from the client to execute only on the server, which in turn sets a vector variable with "rep notify". The idea was that when the server sets the variable with "rep notify" it would result in all clients to execute the related function, which was to set up to add movement input to the pawn, i.e. move the pawn. But that did not work either.

I really tried many things and looked at many tutorials, the documentation, and forum posts, but I must be missing something.

The pawns are set to replicate. "Replicate Movement" is checked. All variations of setting variables and components to "replicate" did not make a difference.

I am lost. So looking forward to some help.

Thanks!

Product Version: UE 4.19
Tags:
more ▼

asked Mar 26 '18 at 02:21 PM in Using UE4

avatar image

Constant
83 8 9 20

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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