Sphere Cast
Use a spherical area with linear motion for detection, and return all entities encountered on the route of the spherical area from near to far. If they are initially in the spherical area, they will not be detected; if the level parameter is filled in, the terrain can be detected