Clarify collision detection algorithm.

Before it was assuming that the correct direction was being checked for
the obstacle in question.