- Home /
Question by
VergilUa · Apr 10, 2016 at 09:08 AM ·
custom editorpolygon collider 2dpolygoncollider2d
Creating PolygonCollider2D from points and offset points
Hi everyone. I'm trying to create custom editor extension, and I've stumbled upon problem. Is there a way to create a polygon collider with additional offset points, from already existing sets of points? In a way, that path didn't go the first point, but to offset point instead?
I've got points, and offset points. How to sort them in a proper way? (see picture)
Adding offset points to points array and assigning it creates a total mess. And there's seems to be no proper documentation on how points array sorted. (Or I failed to find any:P)
Any ideas would be appreciated.
polygons.png
(22.5 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612074523im_/https://answers.unity.com/themes/thub/images/avi.jpg)