Hey all, ran in to a bit of a dilemma that’s probably easily solved but I’m over looking it. Most multiplayer FPS games nowadays have hit markers when shooting an enemies. Been trying to add them via user widget with no success due to the fact all the bullet tracing and damage is ran on the server so only the server receives hit markers. Any one have a solution so only the player shooting sees the hit markers on hit?
Shoot (lol) an event to the clients that are hit to render a widget that fades and is self-deleted, like a healthbar in darksouls.
Set the logic so that if the client is pinged again, the widget just resets the timer vs spawning a new on off the event (performance).
Thanks for the reply. I’m not entirely sure what you mean. But I think I may have stumbled on a solution by running an entirely separate line trace only on the client and check to see if it hits an actor. Only problem I foresee with that is I think you’d see hit markers when hitting your own team mates. But if you could elaborate on your solution I’ll give it a go as I think a separate line trace would be a waste of resources.
when you calculate damage on the server and send it back to the damaged client, send another update to the one that caused the damage to display a marker of some kind, be it a texture, widget, particle, etc.
I’d take a long hard look at client-side prediction for shooting. As your player base grows so will ping variance. At some point a players ping will make shooting feel unresponsive. You will at a minimum need to have clients do local (fake) shooting.
Going this route will solve the hit markers issue, along with many others.
Thanks for the reply and information. Turns out it was a fairly simple solution and I was just missing a step. After a hit registers I needed to get the instigator of the damage and cast the information back to that player. Working like a charm on all clients and the server. Same concept as relaying a death or kill for stats