{"id":13786583,"url":"https://github.com/j-bbr/PolygonColliderSimplification","last_synced_at":"2025-05-11T22:31:34.182Z","repository":{"id":53582294,"uuid":"92427337","full_name":"j-bbr/PolygonColliderSimplification","owner":"j-bbr","description":"A set of scripts to reduce the complexity of Polygon2D and Edge Colliders in Unity","archived":false,"fork":false,"pushed_at":"2017-06-09T10:09:41.000Z","size":32,"stargazers_count":140,"open_issues_count":0,"forks_count":28,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-17T22:36:24.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j-bbr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-25T17:25:11.000Z","updated_at":"2024-11-11T20:18:16.000Z","dependencies_parsed_at":"2022-09-21T21:41:58.620Z","dependency_job_id":null,"html_url":"https://github.com/j-bbr/PolygonColliderSimplification","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-bbr%2FPolygonColliderSimplification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-bbr%2FPolygonColliderSimplification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-bbr%2FPolygonColliderSimplification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-bbr%2FPolygonColliderSimplification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j-bbr","download_url":"https://codeload.github.com/j-bbr/PolygonColliderSimplification/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253645210,"owners_count":21941313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T19:01:18.472Z","updated_at":"2025-05-11T22:31:29.140Z","avatar_url":"https://github.com/j-bbr.png","language":"C#","readme":"# Polygon Collider Simplification\nA couple of scripts for creating efficient non primitive 2d colliders in Unity(Edge Collider 2D and Polygon Collider 2D). \nYou can adjust and see the results of the optimization in the Editor without entering playmode.\n\n## Polygon Collider\n\n![Polygon Collider Optimization](https://img.itch.zone/aW1hZ2UvNjgxOTcvMzEwMTcyLmdpZg==/original/iZAynj.gif)\n\n\n## Edge Collider\n\n![Edge Collider Optimization](https://img.itch.zone/aW1hZ2UvNjgxOTcvMzEwMTcxLmdpZg==/original/VjvR9G.gif)\n\n## How it works\n\nBoth scripts remove points from the collision shape with a given reduction tolerance using the Ramer-Douglas-Peucker Algorithm. The Edge Collider Optimizer works in conjunction with a polygon collider by casting down a lot of rays from the upper edge of the bounds of the polygon and creating an edge out of the intersection points. \nThat edge is then optimized with the given tolerance. After your satisfied with the result you can remove the polygon collider (and the optimization scripts as well, they are only thought for the Editor). \nBecause the rays are cast down this doesn’t deal with overhanging sprite geometry, but still gives you a better starting point to manually adjust the edge than the default line with 2 points.\n\nLink to the original c# implementation of the Ramer-Douglas-Peucker Algorithm (modified slightly for Unity):\nhttp://www.codeproject.com/Articles/18936/A-Csharp-Implementation-of-Douglas-Peucker-Line-Ap\n\n## License\nMIT\n","funding_links":[],"categories":["Optimization"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-bbr%2FPolygonColliderSimplification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-bbr%2FPolygonColliderSimplification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-bbr%2FPolygonColliderSimplification/lists"}