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"

delay on spawn projectiles form server to client

Hi, I got this issue: I spawn projectiles (with high velocity) from server (replicated to clients) and then projectiles shows up on client with some delay. I think this is something common, because i tried with the MultiplayerShootout of unreal and happens the same but I post this question because maybe someone has found some workaround for this. The issue is only visual, because collisions and damages are working ok on the server.

This is what is happening: https://www.youtube.com/watch?v=naIfa0gY1WM

Product Version: UE 4.7
more ▼

asked Jun 01 '15 at 04:28 PM in Everything Else

avatar image

184 18 21 34

avatar image eXi Jun 01 '15 at 04:32 PM

This looks more like you are calculating the start point and it multiplied by something (maybe the velocity?). If not, then you are spawning the projectile on the server and replicate the movement. I wouldn't do that. Let the client spawn this and don't replicate the movement. As long as the server calculates the correct projectile and damage, it isn't important if one client saw something a bit different.

at least that's my 2 cents here :D

avatar image Davixe Jun 01 '15 at 04:59 PM

The start point is a socket (muzzle) in the weapon mesh, and I'm sure this is not the problem because this problem appears on the MultiplayerShootout too (https://docs.unrealengine.com/latest/INT/Resources/Showcases/BlueprintMultiplayer/index.html) I will try your solution, but it will only work for a few projectiles, other ones like grenades, have physics and the difference between server and client could be too much.

thx for your answer :)

avatar image XilenceX Mar 02 '16 at 10:29 PM

Did you ever find a solution for this problem? The Youtube video in the question shows exactly the issue I'm having with my multiplayer game atm. Yes it's "only" a visual and not a gameplay problem since the server calculates damage. However the delay (or rather distance) at which the replicated projectiles appear on clients is far too long and really jarring for the players as the video shows.

avatar image Davixe Nov 15 '16 at 04:44 PM

Nope, I didn't find any solution. For some time, I was spawning the trail on the muzzle, and then moving the trail with the projectile, but for some reason now the ribbon starts on the muzzle and "teleports" to the first location of the projectile without leaving any trail.

avatar image XilenceX Nov 17 '16 at 10:46 PM

You should try spawning your projectile with 0 movement speed. Then after a few ms (10ms seems to work well) delay set the projectile movement speed to the speed the projectile should have. So the projectile will appear next to the muzzle for one frame. That way our brains tend to "fill in" the gap between that position and the next position the bullet appears at with full speed. So the effect will be far less jarring for the players with that trick.

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

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