Add onHit callback and hit detection