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

Some alternatives that could help:

  • Try a cone shape collision to get overlapping actors in angle in front of player rather than multi trace. Removes the need to tick if managed on begin/end overlaps.
    ConeConst
  • Then trace each: tested tracing for static objects; if no hit then there is line of sight:
    OverlapTraceStatic

From the sort function of your other post Get closest hit to origin in a multi sphere trace? - #10 by Krileon :

  • IMO might be better to just have 2 separate arrays over a map. Having 2 separate arrays allows to sort without duplicating. Then access closest from index 0->.

Haven’t really compared, just thought it was worth the debate.

1 Like