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"

Launch Character behaves differently on client vs server

I have a game where players use a grappling beam to fly around an arena. Right now, I have it set up so that characters add themselves to a list on the server whenever they click and remove themselves from that list when they release click. alt text (The launch location and speed are set by some other code and there's no problem there)

Then, the server goes through the list and launches each character towards their desired location:

alt text (The delay was an attempt to make the launch speed independent of framerate)

Both servers and clients are launched by this correctly, but the clients do not accelerate as quickly as the server does.

Example Video

Note: The left side is the server, and it shows the velocity of each player when they grapple. The server reached a velocity of ~10000, but the client only got to ~4500

If anyone could help me figure out why this would happen, that'd be great.

Product Version: UE 4.18
capture2.png (134.7 kB)
capture.png (166.7 kB)
more ▼

asked Jun 06 '18 at 09:42 PM in Blueprint Scripting

avatar image

1 1 3

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

2 answers: sort voted first

I may have found a workaround, albeit in a cheap and dirty way. I increased the delay at the beginning of the tick to .2 and multiplied each launch speed by 6. Now, the client should fly at the same speed unless its ping is above 200 ms because the launch command is called less frequently than the client receives network updates (If I understand it right). I start to see slight slowdowns after that, but I don't want to increase that delay any more so it'll have to do.

more ▼

answered Jun 08 '18 at 02:03 AM

avatar image

1 1 3

avatar image mightyenigma Jun 08 '18 at 02:08 AM

Fair enough. Maybe the people who made Sky Noon would be willing to share with you how they handle problems like this since they make heavy use of grappling hooks in their game

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

Maybe it is because of the round trip delay between server and clients making it so that the clients execute fewer Launches. You could count them in a variable incrementing it once for each launch to find out.

another possibility is that the clients have a slower Tick (framerate). There might be a way to normalize this by factoring in the delta time.

This appears like the same problem of stuttering movement when people replicate a pawn that doesnt have charactermovement prediction and smoothing for network play, only instead of stuttering with the world position it stutters with the Launches? Maybe.

more ▼

answered Jun 06 '18 at 10:30 PM

avatar image

3.8k 18 20 20

avatar image MrBollywoggers Jun 07 '18 at 08:45 PM

Alright, so I tested it with an integer to count the launches and found that the number is the same. The server ran ~300 launches in 10s, and so did the client. Although this test doesn't show much because all of the launching happens on the server and I don't know of a way to measure how many launches the client actually executed within that time.

avatar image mightyenigma Jun 11 '18 at 10:21 PM

Another idea: what if you used a Timeline node?

(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