- Home /
How can I edit a polygon collider2D?
I have all of my sprites together, and I am looking to have accurate collisions with other objects by using the polygon collider2D. When I add the collider and press edit, I am not able to change the collider at all. I tried holding shift, and that did not work. This has been a problem for a while, but now that I need it most, it is very important to have. I am on mac and using the free version of Unity.
Answer by tanoshimi · Dec 22, 2015 at 03:17 PM
For what it's worth, I just encountered this issue and, for me, the problem was that I had two inspector tabs in my project workspace (even though neither set to Debug, which I had seen as a solution to a previous question).
Removing one of the inspectors made the "Edit Collider" button on the other one work....
I have 4 open Inspectors. I need to leave only one open and restart the Unity. This is old bug.
Oh, this is so stupid (I mean Unity dev $$anonymous$$m), but the solution works. Thanks.
Answer by KwahuNashoba · Oct 19, 2016 at 05:25 PM
For me it solved the problem by zooming out the scene view. If it is too zoomed in the handles for editing polygon are "behind you" so you have to zoom out in order to view them
It happens to me, too. In the end, I have to scale the UI element like 100 times larger and zoom all the way out for editing. (Was on 5.3.6p4)
Answer by Zoelovezle · Dec 22, 2015 at 04:45 PM
Select GameObject
UnHide Polygon Collider and hit button Edit
Now in scene view if you take your cursor over the points of collider they will get highlighted with light green.
Just hold left mouse button and move points.
If you need to delete a point , hold down the command on mac and then the if you take mouse over it it will get highlighted with red color , just left click and it will get deleted :)
Hope this helps you
Worked like a charm on Unity Personal Edition 2019.2.12f1
Answer by Smaika · Mar 10, 2015 at 12:53 PM
Have your object selected > switch to scene view > click edit box on the collider component > drag and edit it on the scene view
Sorry, but this did not work. I know how to edit a collider. It just doesn't seem to work at all.
I'm also using $$anonymous$$ac and a free version of Unity, and can't get it to work either. I've edited colliders before upgrading to Unity5, but ever since the upgrade it doesn't seem to work. Probably doesn't matter, but I'm using the trackpad and not a mouse.
Answer by Mazer83 · Aug 01, 2017 at 09:22 PM
Try toggling "IsTrigger" on/off, or off/on, depending on your situation. This cancels out the bug for me.
Your answer
Follow this Question
Related Questions
Collider/contact functions on 2d game. 2 Answers
Player ignores tilemap collider on fall 1 Answer
2D Collision detection not working 0 Answers
Spike Player Die 0 Answers
Generating a pixel-perfect collider for an object at runtime 1 Answer