Minimize turns in grid pathfinding

Hi, I am using 2d grid pathfinding and it is working well. Sometimes the movement for the entities look a bit strange to the player though


I uploaded an image to show what I mean, basically the yellow entity is moving right to left and follows the green path. The orange path would be the ‘straight’ line

Of course since it is a grid, that angle is not inherently possible.

Is nav mesh the only way? The game is just 2d


You might want to add the RaycastModifier to your agent. That will simplify the path significantly.

1 Like