I'm working on a game project, and I am working on the AI aspect of the game. I want the enemy objects to start aiming and shooting at the player when they are in sight of the enemy, and i came across this article on a way to do that: http://www.emanueleferonato.com/2007/04/29/create-a-flash-game-like-security-part-2/
my question is can you do this same thing without using an actual line? can you for instance use a hit test point and basically define a line? or some other way of doing it without actually putting an object on the stage.
I am trying to make things as efficient as possible and don't want to use this approach if possible. if you have some advice, or code or links to a helpful resource I would greatly appreciate that!