For Physics2D.BoxCast (Unity - Scripting API: Physics2D.BoxCast), there were a couple items I was not sure on.
The documentation says: “Casts a box against colliders in the scene, returning the first collider to contact with it.” My main question was whether this will return the closest impact point within the RaycastHit2D, as opposed to whatever collider it happened to process first. I am replacing a Physics2D.Linecast call with the Physics2D.Boxcast call in order to account for width in my test.
I assume the angle parameter rotates the box being used to test, though it would still move along the direction vector. Likewise 0 would of course result in no rotation.
Is the diagram posted here correct? I wanted to make sure I understood the size parameter correctly.