Hi all
I'm making a small fps shooter game and I want to have guards patrolling at different places in the level. How can I make guards detect the player when he is within the view of the guard?
I can imagine something like checking angles (if the guards view is 45 deg for example) but I can't for the life of me figure out how to check if the player is within the guards view...
It would be great if the solution took occlusions into account (so you could hide behind a wall)
Thanks in advance
I'm making a small fps shooter game and I want to have guards patrolling at different places in the level. How can I make guards detect the player when he is within the view of the guard?
I can imagine something like checking angles (if the guards view is 45 deg for example) but I can't for the life of me figure out how to check if the player is within the guards view...
It would be great if the solution took occlusions into account (so you could hide behind a wall)
Thanks in advance