preparing the collision with the obstacle at the end of the path