Best way to deal with multi sphere trace line of sight?

I don’t need a cone trace, but a sphere trace with line of sight. If I needed a cone trace I’d still do a sphere trace and use vector math to filter out any hits that aren’t within my cone. I actually have a post about this below with the vector math provided.

I do not recommend trying to do custom traces by attaching collision shapes to actors. They’ve to update their transform along with the actor. That’d be a lot slower than doing a sphere trace. The sphere trace itself is incredibly fast. Even if it hits 1000 it’s fine. It’s just itinerating over that 1000 for example that could be slow, but that’s mostly a BP problem. CPP can deal with large loops fine.

I don’t see why it’d matter to be honest. You still need to push the sorted results into an array to be returned.