Problem with Tracing

Well you should make sure that you first check if it’s something interesting. You don’t have to check every wall if the line of sight is obstructed by another wall. You should always keep the amount of actions you do as low as possible.

On that note. You might want to go away from the multisphere trace to a simple sphere collision. Set it to “Overlap All”. Collect everything interesting (not walls. Only your characters) in an array and check every if they are in line of sight.

When they leave that sphere remove them from the array.

That will be quite a lot cheaper on performance.