In my game, I want the player to hit multiple enemies if they are grouped together, so I created a multi-sphere trace system. it works very well but…
i realise now the enemies can hit me behind walls “of course im making a multi-sphere trace “
soo my question is how i can hit multiple enemies and not get hit if im behind walls or boxes.
Does anyone have some ideas to help me
If anyone want to see my code is this
Okay, so I studied a bit more and found that if I change the “for each” node to a “for each with Break ” and if I check before adding the actors if the actor is like a “wall”, then I interrupt the “for each” loop and it works.
But now I’m checking if it’s a wall by a “tag” that I assign to my wall. I’d like to know if there’s a better way to do this.
That way, I wouldn’t need to assign a tag to every blockable object in my game.
here is how i did but i wonder if there is a another way

