-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
NPCs need to be able to navigate around the world using the navigation mesh.
The navigation process is the following:
- Given a target position, a path is calculated that would get us there.
- The path is simplified, since that will make things like triangulation easier.
- To reach each point, a series of checks are done to make sure it is possible for us to reach it.
The navigation to each of the points of the path is known as a navigation step.
Movement checks
For each navigation step, we should do a series of checks, these include:
- Trying a simple hull cast, if we fail, try to change our target position a little bit to the sides to see if we can avoid it (triangulation).
- If an obstacle is found in the way, check if it's a low obstacle that we can just ignore (this is used for things such as stairs).
- If at the start of the navigation step we are too close to a wall, see if we can get away from it.
Status
- Triangulation
- Stair stepping
- Initial wall avoidance
References
- Half-Life 2 NPC Movement Part 1: Local Navigation (by pinsplash) https://www.youtube.com/watch?v=E42AomiAWis