Added collision and player detection.