AI: Get NPCs to detect and follow the player based on their line of sight (12-minute video)

b8

In this short video you will get to understand how you can use rays and raycasting for your games to make NPCs’ behaviours more realistic and, for example, trigger a specific behaviour when an object or another character is in their line of sight.


We will look at:

  • Creating a ray from the NPC.
  • Casting a ray for debugging
  • Get the NPC to follow the player if the player is in front

Related Articles:

Leave a Reply

Your email address will not be published. Required fields are marked *


*