When dealing with regular-size vertices on a graph, such as grids, it's pretty common to see some kind of robotic movement from the agents in the game. Depending on the type of game we're developing, this could be avoided using path-smoothing techniques, such as the one we're about to learn:
Smoothing a path
Getting ready
Let's define a new tag in the Unity editor called Wall and assign it to every object in the scene that is intended to work as a wall or obstacle in the navigation.
How to do it...
This is an easy, yet powerful, function:
- Define...