Best Method for Multiplayer Bullet Hit Detection

Hello there.
I’ve been searching the internet and have struggled to find good data that answers my questions.

On the topic of multiplayer hit detection with bullets, is it best for the client to send an RPC to the server and for the server create it’s version of the projectile immedietly and continue like normal? Let me explain why I think this is awful:

I have programmed hit detection logic in C++ (no engine, just DirectX11) utilising Valve’s method, detailed in their renowned post here. This method purposfully renders other clients (relative to a local client) back in time resulting in no prediction, only interpolation, in the absence of packet loss. Due to this, in CSGO for example, when a player shoots, the time they shot is recorded (UE4 does seem to record timestamps of inputs I believe) and the server “rewinds” time to check if their version of the client hit anything when they shot at that given time. This is what gives CSGO some of the best hit detection of any game, there is no need to lead your

I am struggling to find any form of equivelent in UE4. It seems to be standard to just send an RPC to the server to create the projectile and continue as normal, none of this fancy rewinding stuff.

Question 1: But with that said, is there any way to replicate Valve’s method easily with the UE4 multiplayer system? Specifically, I’m asking if it is easy to check hit detection back in time. Does UE4 have any form of this in their own hit detection?

Question 2: I’ve had an epiphany whilst writting this out; the good old rubber duck method. Anyway, anyone who’s played games that use entirely projectile based bullets would probably agree that there seems to be a greater delay in hit detection than compared to"hitscan" and also you seem to need to lead your shots close up more than you might think. Is this because these games are actually just sending an RPC to the server to fire a projectile once the message arrives? This time delay would be hidden by the time it takes for bullets to travel. Has this become the industry standard for projectile based bullets in video games?

Thanks for reading guys, I appreciate your time greatly.

Question 1: Yes that is pretty standard for hitscan, although afaik it is not builtin the engine. On server-side in character code you can add a history of positions with timestamp, and push to it every frame. Limit the size appropriately since you won’t need to rewind more than let’s say 400ms. Then, when firing on client, send an RPC to server, and make the server rewind all others characters positions by shooter’s ping or ping/2 before performing hitscan trace. Also you can trace on client before sending RPC to server, and send the victim along in RPC (if any), so server doesn’t even have to check anything if there was no hit on client.

For projectiles it is much more difficult and I’m not sure there is a “proper” industry standard. Play different games at 200ping and you’ll quickly notice differences. Some games you see your projectile appear with a delay. Some games you see your projectile appears instantly but also experience lots of denied hits at closer ranges. Some games you see a projectile appear instantly which is then replaced with another projectile. It’s up to you to decide and implement what’s best for your game. All methods have both pros and cons. You might get best results by blending various methods together based on sensible conditions.

Excellent, thanks for the reply. Yeah I could manually record positions and do it that way. It would require my own interpolation code etc, which I can do. However, I’m curious if we know what they elected to use for Fortnite? It seems to me that they would use the best system they can and would make that available, easily on UE4. Does Fortnite use projectile weapons and spawns the projectile instantly on the server when it receives an RPC? I’m sure that’d work well for longer range combat which Fortnite tends to be I think. Also I know UE4 does keep timestamps of inputs to send to the server in chunks, so I will need to have a greater look at this.
Again, thanks for your time.