Physics.CheckBox?

Hello all,

I’m currently attempting to write some editor code that can scan outwards from a certain point to detect how much clearance exists. I see the Physics class has a CheckSphere and CheckCapsule, but sadly these aren’t very controllable on their y-axis, which is making it difficult for me to tell the true clearance at a point.

Does anyone know how a CheckBox sort of activity could be used? I am currently leaning towards raycasting outwards from the point on 8 angles… but the resolution on this won’t be as great as I would hope. A box collider that I could expand would be ideal.

Or is there perhaps a way I can access all colliders in the scene prior to runtime? And somehow check for box collisions there?

Thanks for any/all help.
Cheers

EDIT: Sorry said z-axis, but meant y-axis.

I don’t know if this will work, but you could use a cube primitive since it has a cube shaped collider on it. Then use OnCollisionEnter as you resize/move it. Haven’t tried to see if it would work, but might give the behavior you are looking for.