- Home /
Optimize PolygonCollider2D?
Is there anyway to optimize the use of PolygonCollider2D? I'm adding an PolygonCollider2D via C# script to a very odd looking image and this creates 200+ vertices.
Since I need to add the PolygonCollider2D component via script and not manually in the editor, I don't see a way I could optimize the collider. Can I manually edit the vertices? is that going to take a long time? is that even an optimized way of doing it? do you recommend an alternate solution?
200 verts on a collider might be okay depending on its nature, how many instances you have, and the target platform. But it seems pretty darn high.
Is there some reason you can't create the collider yourself? Bottom line is, always use the fewest verts you possibly can for a collider, adhere to established good practices, and don't leave it to any automated system if that system produces undesirable results.
Your answer
Follow this Question
Related Questions
OnTriggerStay Question 0 Answers
Static collider as a child of a rigidbody 1 Answer
Collider optimization & Light probe optimization 0 Answers
Disabling colliders in Terrain Trees? 1 Answer
Check trigger/collider once? 1 Answer