Adds rudimentary collision detection.