Trace on server hit client actors

In the code of my character, I’m performing a capsule trace (sweep single) in order to determine if there is something in the way of my character before doing a special move.

When I execute that code on a client, it’s working fine, but whenever I try it on the server, I have a strange behavior: the trace is hitting a character that is supposed to be only on the client!

That is, on server, I have my character C1 doing the trace test, and this same character appears as C2 on the client of another player. But when on the server I’m doing the trace test while ignoring actor C1, I’m hitting actor C2… which is that same actor but on the client!

How is it possible? How can I avoid that?

Sorry to necro, but I’ve been having a similar problem and this is the only thread that I’ve found that comes close to it: when I check the role of the actor returned by a trace performed from the server, I get “AutonomousProxy” instead of “Authority.” But they should all be authority if they’re on the server, if I understand things correctly. Did you ever find a solution to this?

In my case: player is shooting weapon and is hitting target on server but on local client is hitting self.
Weapon is separate actor, spawned with rpc and owned by player.
To solve it I’ve used “actors to ignore” array on the trace node, array is replicated and holds both server and client pawn references. Array is set when spawning weapon with rpc and passing client pawn ref.

rest in peace