Uploaded October 2019 | Updated September 2026, 1 week ago
In this video we create a much more realistic system to detect whether the enemy can see the player.
I show you how to use raycasts to detect whether the enemy can actually "see" the player or if they are behind a wall or too far away. This is a far more robust check that just simple distance.
We also look at writing a robust function that returns a true/false value to keep our code neat, tidy and readable.
In this video we create a much more realistic system to detect whether the enemy can see the player.
I show you how to use raycasts to detect whether the enemy can actually "see" the player or if they are behind a wall or too far away. This is a far more robust check that just simple distance.
We also look at writing a robust function that returns a true/false value to keep our code neat, tidy and readable.










