Hi, I'm trying to make a game in Unity2D and I need the enemies to follow the player when they are close enoguh. For that I use an Sphere collider 2D that is the range of distance for the enemy to detect the player character. Now I need the enemy to stop following the player character when tere is a wall between.
I thought that a good option for that was the raycasting but I have no clue how to use that for my purpose. Any idea?
Thanks a lot!