Chapter 6: Path Following and Steering Behaviors

In this short chapter, we will implement two Unity3D demos to explore steering behaviors. In the first demo, we will implement a script to make an entity follow a simple path. In the second demo, we will set up a scene with a couple of obstacles and program an entity to reach a target while avoiding the obstacles.

Obstacle avoidance is a fundamental behavior for game characters when moving around and interacting with the game world. However, obstacle avoidance is generally used with other navigation systems (such as pathfinding or crowd simulations). In this chapter, we will use the systems to make sure that we avoid the other agents and reach the target. We will not talk about how fast the character ...

Get Unity Artificial Intelligence Programming - Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.