- Home /
Is it possible to get separated shapes from PolygonCollider2D?
Is it possible to get separated shapes from PolygonCollider2D?
Answer by Chris_Dlala · May 22, 2014 at 07:03 PM
Hi, looking at the docs for PolygonCollider2D it's possible to get the path or points for the collider. Here is a WIP working example of this information being used for destructible 2D sprites.
When PolygonCollider2D is not convex, it will be divided in to separate convex polygons. Is it possible to get those subpolygons?
After a quick look I've not managed to find a way yet. I assumed that each path would be a new poly, missed that it's not in the docs. Not sure why you use it but you could always have more than one poly collider, not ideal I know, I'll take another look soon.
It is very aggravating being able to see how many regions there are, yet not being able to affect them.