Make ray shorter when intersecting.