Implement elastic collision detection