Add collision detection.