- Home /
Polygon Collider 2D isn't allowing me to edit points
When you add a 2D Polygon Collider Component, there is a edit collider button, and when I press it, it doesn't do anything, i can't edit, add, or delete any points. If I click, after clicking it, it selects another object, and no "green square to edit the points" is shown.
am not in debug mode, if you think that's the problem.
have also tried scripts to manually edit the points, but we are talking about 250+ points, so that's not going to happen!
Any help is appreciated,
Thanks!
Answer by tanoshimi · Dec 18, 2016 at 07:09 PM
This can also happen if the object to which the polygon collider is attached is either rotated or scaled - it seems the editor gizmo for 2D colliders expects objects to have a scale of (1,1,1) and a rotation of (0,0,0).
Yep! That's it. The scale has to be (1,1,1). I had $$anonymous$$e set to (1,1,0) and could not change the collider points. Thanks so much :)
Thank you, just ran into the same issue. Scale was (1,1,0).
Answer by Mazer83 · Aug 01, 2017 at 09:46 PM
Try setting the object's Pos Z to 0, if it isn't already.
Answer by Haghshenas · Dec 18, 2016 at 07:07 PM
For me it solved the problem by zooming out the scene view. Remember in some case you need zoom out very much . this is an bug and i reported.
Answer by maketor · May 30, 2018 at 03:42 AM
use this:
PolygonCollider2D col;
public IEnumerator Example(int i,Vector2[] v2)
{
col.SetPath(i, v2);
yield break;
}
Your answer