{"repo":"shnewto/bevy_collider_gen","free":true,"listed":false,"github":"https://github.com/shnewto/bevy_collider_gen","clone":"git clone https://github.com/shnewto/bevy_collider_gen.git","description":"a library for generating 2D colliders for bevy apps from images","language":"Rust","stars":104,"topics":["2d","bevy","collider","gamedev","images","png","rust","transparency","crates-io","rapier"],"license":"Apache-2.0","category":"game-templates","readme_excerpt":"bevy collider gen A library for generating 2d colliders, for bevy apps, from images with transparency Specifying your dependency By default, bevy rapier2d is enabled (along with parallel and plugin ). This is to help with the out of box experience, specifically, being able to run examples and tinker. But you'll probably only want to just use one of the physics engines supported so when you use it in your own crate fill in in the bevy collider gen dependencies with something like this for bevy rapier2d Or this for avian2d Example To see this in action you can run the example, with no arguments it generates a scene with various colliders using PNG's in the assets/sprite directory bevy rapier2d avian2d Texture atlas Shows a DynamicCollider regenerating when the TextureAtlas frame changes. Defaults to rapier2d ; pass -F avian2d to use avian instead You can also specify a path to an image yourself the example will attempt to generate one or more convex polyline colliders for the objects it finds About / why I was looking for a way to iterate on some 2d scenes with colliders on things with more sophisticated shapes than simple geometry, I figured there should be enough info in an image with transparency to generate colliders, and... there is! So i packaged up my approach here in case anyone else could benefit. How it works 😄 head on over to the edges crate to learn more Caveats - as mentioned here and there in these docs, this implementation requires images to have transparency in","default_branch":null,"files":null,"tree":[],"storefront":"/r/shnewto","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/shnewto/bevy_collider_gen/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}