BoxCast need to record multiple hits against the same object

Hi all,

I’ve run into a bit of a problem: I need to sweep a volume of space and detect all contact points within it.

At the moment I’m using Physics.BoxCastAll to do this which works except for one edge case: If I have a large concave mesh collider (like a terrain) it only registers a single hit, even if the boxcast were to go through a hill, continue through empty space and then hit another hill.
I need to detect the hits with both hills.

I tried doing a regular Physics.BoxCast and then doing a new one from each impact but that doesn’t work because the terrain can be within the area of the box when it starts and doesn’t register.

Is there anyway to get multiple contact points back from one collider when doing a BoxCastAll? Can anyone think of another solution?

1 Like

I have the same Problem.

1 Like