- Home /
Question by
NarallandaKaratoga · May 27, 2019 at 12:23 PM ·
raycastphysics2draycastall
How to raycast all intersection points to a PolygonCollider2D?
Physics2D.Raycast only returns the first hit, while Physics2D.RaycastAll returns all colliders' first hit.
However I want all hits that represent "cross the boundary of a polygon", including hits from inside to outside.
Do I have to write a specific algorithm?
Comment