Collision detection on pathfinding objects

If using pathfinding, the way I’ve done this in the past is to check if Ball is in Collision with Ball, pick the one that is nearest to the destination (inverted, so it picks the furthest), then set the speed to 0.

This sets it’s speed to 0 until it is no longer in collision. Here’s a link to the last time I posted this solution: Collision problem between two enemies - #6 by Silver-Streak

2 Likes