Multiplayer fast projectiles issues

Hello community, simple problem:

  1. If i spawn on server projectiles with high velocity, on clients it looks like they are not spawned from muzzle, but like 5m away…

  2. I solved problem 1. with this → im spawning projectiles on multicast event and then damage projectile on server… however when server projectile kill player (destroy actor) then multicasted projectile which is spawned maybe 0,05s later than server projectile, cant overlap pawn because he is destroyed and then projectile continues…

could someone help me please? im messing around with this many days and i cant find solution… I need only little advice…

all you need to do is inside youre projectile blueprint . when the bullet is spawned set its initial speed/velocity to 0 . then add a delay node with a time of 0.01 from the delay node then set the speed/velocity of the projectile to be the correct desired amount . what this will do is spawn the projectile it wont move for a frame because the speed/velocity is 0 and so on both server and clients you will see the bullet at the correct spawn postion then in the next frome you have set the correct speed so the projectile will then move accordingly. any higher time than o.o1 delay and the fireing will look funny.

Thank you Enigma, i tried this once more and i got really good progress, now is projectile correctly spawned and overlap impact effects are good too.
However i have still some problems, and that is server is not fast enough to update some informations…

  1. it seems like node “set actor hidden in game” is something like reliable (or client side?) because it working very well for my needs on both, server and clients…
  2. i need to stop projectile movement immediately after projectile overlap pawn, but this node is not reliable, some projectiles, especially that ones fired from short distance overlapping pawn and have second impact on wall… Is there any way how to tell client immediately to stop projectile movement?

I need to stop that projectile movement because im destroying projectile after 0,1s because without delay node, it doesnt spawning effects on clients… Some ideas how to resolve this? :slight_smile:
At this stage projectile working almost really good, this is probably last thing to solve here…Projectile speed is 9000…
Here is my whole BP for future reference for someone

this is all i do . first go to projectile movemnt and set the speed to 0 .

84aeb95827089bab25bc84135161485e3cd7f6e2.png make sure you set both initial speed and velocity to 0 .

then in youre projectile do this

3559ad0df709d56b5395fc00ee262cce39c8927c.png

so basically my projectiles start at 0 for one frame then after one frame they are then set to 3000 projectile velocity. the only thing you need to be carefull of using this technique is fireing while moving forward which can cause a bug where you move forward within the same frame as the projectile being still at 0 speed causinbg you to collide with youre own projectile

Yes i got this, this is working correctly, but im having problem now when projectile overlap pawn and then continue few meters even if i set stop movement immediately…
I need to handle collisions now for fast projectiles :slight_smile: if you look at first picture from game, i fired projectile to pawn, impact is spawned correctly on pawn and projectile should stop here but it continue to wall and spawn another impact fx on wall :confused: on server player i dont have this issue, only on clients, i need to somehow make that projectile stop on pawn, it works when collision is set to block but then its buggy and pawn movement is changed after projectile lands so i have overlap…

Strange is that node “set actor hidden in game” works 100%, but “stop movement immediately” not, maybe only 50%…

bump… really no one who found solution?

Well i don’t know how to advise you further I personally wouldn’t use overlap Events but hit events instead . Also I don’t know why you are doing unnecessary stuff like hiding the mesh , stoping the movement and using authority node to call the apply
Damage. It is already a server event indicated by the little lightning icon on the corner of the node. All I do on my game is check for a hit/collision , apply damage then destroy the projectile . Also I give the projectile a lifespan so that if it misses the player it doesn’t fly and live forever taking up resources .

Hi Enigma,
Thank you for all advices. I not used hit event because then collision needs to be “block” and it blocks pawns movement… Im in endless circle of problems with this…
I almost gave up this but i want to try last one thing. Is there any way, how to make “block” collision projectiles to not block pawn movement on impact?

im having this same issue,
**EniGmaa’**s answer works… but only if I spawn one projectile. my shotgun uses a loop to spawn five, and it fixes only the first one. (yes, I am running this code in the projectile, not the gun)
what am I doing wrong?