How do I make my enemy detect the player from a certain distance?
This is how my tree looks like
I originally tried using Raycast 2d to detect the player, but it detects not only the player, it also detects other things such as walls too.
I'd like some help on a way to do it in a more efficient way. If it matters, the game is a 2D platformer.
Thanks, if I wasn't clear enough ask me bellow and i'll try to explain it better.