Problem with Tracing

Hi all guys!

I have a problem with the Trace.

I would use a multi sphere trace to check if there is an actor in the radius of my torch. The bp works well expect when there is a wall or others components between the actor and the torch.

I took 2 screenshots, in the first i activate the trace, and took cube and actor’s hand, but if i move, we can see all actor’s body is hit.

I’m not quite sure what your point is… What exactly isn’t working as intended?

I wish the cube block only the trace that pass through it.

But using a multi trace means you will get everything. It’s not a line of sight.

You will have to check that by yourself. For every hit that hits an enemy you will have to do a single line trace and check if it hits the actor or a wall.

So if I understand well, I need to do a line trace with the coordinates of each points of multi sphere trace, right?

Thnx Erasio

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.

Thnx Erasio, now I will try it!

Thank you again!