This is a short chapter in which we will implement two Unity3D scenes to explore steering behaviors. In the first example, we will set up a scene with a path and implement a script to make an entity follow this path. In the second example, 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, usually, obstacle avoidance is used in conjunction 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 will reach a destination, and we will not calculate the shortest path to the target...