CastRay appear the same entity

After I upgraded from 1.0.16 to 1.3.x, the ray would hit the same entity at the same position.
Occasionally, there will be points that are significantly higher than the plane.