Answer the question
In order to leave comments, you need to log in
How to create a chasing enemy that only follows the player in its line of sight in Unity (2D)?
I created the enemy itself, that is, it pursues the player, but indefinitely. And I need him to pursue the player only in his line of sight. That is, when the player comes out of there, the enemy stops.
Answer the question
In order to leave comments, you need to log in
I assume that you have a banal pull-up along the coordinates behind the player. In this case, it's school geometry, you just need to ignore the player when he is outside the desired zone.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question