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"

Pawn replication issue

Hi;

I have some problems with a Pawn and a FloattingPawnMovementComponent. I can not retrieve the location of the pawn on the side of the server.

My pawn is configured as follows: Replicate Movement, Net Load on client, Replicate checked.

However, it is not visible to other pawn, and when in a custom event running on the server I use GetPlayerController>GetControlledPawn>GetActorLocation it's always Zero. I have add IsValid between GetControlledPawn and GetActorLocation for testing purpose, that does not give me any error.

The conclusion is that my Pawn is obviously not replicated, but it seems to be present side server.

However, why is not he replicated since he is configured for this? I can not understand the inner workings of the pawn and the MovementComponent, nor why the server seems to completely ignore the parameters ...

Cordially...

Product Version: UE 4.21
Tags:
more ▼

asked Mar 10 '19 at 09:51 PM in Blueprint Scripting

avatar image

BigBadWouf
10 2 4

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

2 answers: sort voted first

Hi BigBadWouf,

Assuming that the base class of your pawn is APawn then what you have is the expected behaviour because movement replication is not a default feature of this class. So you would have to do the replication by yourself by :

  1. Sending all the clients inputs to the server with RPC calls.

  2. Multicasting the inputs to the other clients.

(for more info you can read this thread)

While this would work, you should rather use the ACharacter class with its CharacterMovement Component that takes care of the movement replication automatically.

Hope it helps.

more ▼

answered Mar 10 '19 at 10:36 PM

avatar image

Elou44
179 3 9 7

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

Use node: Cast to pawn > get controlled > cast to controller bp ////// dont forget to set your current controller bp from gamemode on root component of pawn.

more ▼

answered Mar 10 '19 at 10:40 PM

avatar image

TheSubZer0
114 7 11 16

(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