I had a feeling that’s where this was headed.
There’s only one approach that comes to mind when dealing with ESP. That’s a hella lot of traces and conditional checks against the games features/abilities,rendering/occlusion etc etc etc.
The player gets flagged for a thorough dev/ac-team review of the round played.
You’ll need the server to record demos (replay system). You’ll need to add collisions to actors that normally don’t have, nor need them (e.g. foliage). Can’t do traces against branch leaves, bushes, grass etc blocking the view if they don’t have collision.
e.g. long range through heavy soft cover… player hidden by bushes, grasses etc.
You’ll need custom trace channels as well. Along with a comprehensive occlusion table that details the rendered/not rendered distances for each of these special actors. Highly consider LoD changes as well.
If your game has spatial audio (panning/hrtf, w/attenuation) for player movement… footsteps etc. Then you’ll need to consider false positives at specific ranges. Can’t have the system flagging a player that could easily be heard. You also have to consider software/hardware compression on audio. This will increase the loudness of lower volume sounds over distance.
Heavy usage of “was recently rendered” will go a long way. Loads more to this and your maps/asset have to be designed from the ground up based on the intent.
All of this needs to run on the server, never on the client. This will be a nice chunk of your overall tech debt.
At the end of the day you also have to be able to prove the use of illegal software before taking heavy action. e.g. perma bans.
Edit
IF players know you are actively checking for ESP usage then they’ll stop being obvious about it. They won’t take shots through heavy visual cover. They won’t track players (ads/soft aim directly on them) outside of audible range. In essence they’ll know where everyone is and play it like happenstance and you’ll be none the wiser, nor able to confidently say otherwise.
You may catch the script kiddies here and there or the rager, but not the majority paying $30-$100 a month on a subscription package.
This results in the majority of the code you’ve added to detect them a complete waist…performance bloat.
ESP is a hard nut to crack. I’m pretty confident if any of the other AAA studios, AC developers had a way to do it, they’d do it and this conversation wouldn’t be taking place.