Fix to raycast to get the closest point.