BP LAN game, ¿lag on traces? (shooting)

Well, I build a first person shooter game, ready for multiplayer, 100% using blueprints.

The problem comes that when I test the game with a server and a client (or more clients), client “bullets” get lagged.

This is normal to happen on an online game, but Im very concerned about the frequency of this happening on a LAN game test.

What I mean by lagged bullets is that if a client is moving, for example to the right, and he shoots agaisnt another player, the shooter client trace shows a hit and spawns the effects (blood), but the server gets this trace a bit more displaced to the right so there wasnt a hit and it doesnt takes damage.

My weapons are instant hits so Im just using line traces to do the impact checks.

Someone knows somethink about it? maybe its because BPs are not ready enought for this kind of replications?

Thank you community!

I think you either do it on client side, or do it on server side, don’t do both.
( most modern game use client side hit detection for better responsiveness. )

That means, when client says it hits, spawn blood, and then tell server to take damage on the victim and send spawn blood to all other clients.
(damage taken would be replicated to all clients.)

I see, I´ll give it a try, this sounds like a good solution

Thank you

Most modern FPS do not use client side hit detection at all …

Usually your client sends the ‘shot’ and the server says wether it was a hit or not then send back the information regarding what to do. Client side hit detection is only used where it is prohibitively expensive for the server(s) to do it (mmofps come to mind).

I was thinking so, moreover, use client side hits would open a security hole right?

I remember games like halo reach/4/… where sometimes a client saw blood spawning on his target, but really it doesnt toke damage, so probably is the same that is happening to me, the difference is that Im on LAN and this happens so many times…

So what should I do?

Pretty much. The original Planetside had client side hit detection, you could literally have a piece of software bound to a key that would stop network traffic … walk around a corner and kill someone then press the key again to start traffic. The guy would never see you and you would insta-kill him. Lag switches are still around (some douchebags use them in console gaming for when they are hosting servers and do the same thing… Peer to peer gaming /sigh).

Then, what could be causing this lag to my game?