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"

Resync remote chacter pawn location

My character pawns are capable of pushing each other when walking into each other by launching the other character. on local play it works fine and on a networked game it works fine to, the problem is that slight variations between the client and the server gets magnified by pushing and eventually the client and the server gets wildly out of sync and the client. I can't seem to get the movements to get in sync with each other. Any idea how.

Product Version: UE 4.19
Tags:
more ▼

asked Jul 18 '18 at 03:45 PM in Blueprint Scripting

avatar image

JoSilver
236 8 13 22

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

2 answers: sort voted first

Well I "Solved" The problem by brute force. Whenever one of my pawns is launched, the Server set the remote pawns location to the server instance's location and if a pawn bumps into another the same thing. It certainly solves the issue but not in the way I'd hope.

Really I want to know a way to make the server reposition pawn more frequent. Before the server would eventually resync but not before the remote pawn was half way across the map relative to the server location. The server pawn bumping the remote pawn helped resync it was not a guarantee.

more ▼

answered Jul 19 '18 at 09:41 PM

avatar image

JoSilver
236 8 13 22

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

I'm not sure the best way to solve that either (assuming your pawns have Replicate Movement checked like they normally would), but I might try putting the re-sync like you're doing on a 1-second looping timer on the server side, and changing the automatic one so it happens not necessarily when launched but upon firing its Landed event (the one that fires when a Character lands on something after falling or jumping)

more ▼

answered Jul 24 '18 at 04:23 PM

avatar image

mightyenigma
3.8k 18 20 20

avatar image JoSilver Jul 24 '18 at 04:39 PM

Putting the refresh on delay of 0.2 seconds was my first try. It certainly worked but there was a visible stuttering on the client, it was incredibly distracting, I decided to put it on when a character is launched or bumping another because the stuttering is far less obvious at those times, and it's also when the need to resync was most needed as things work fine any other time.

But I was experimenting to see if this desync happened with or without launching and when you just have two basic character pawns walk in to each other this desync happens.

either way putting the refresh on multiple actions might be useful.

(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