Libgdx and Box2D Draw a custom shape

时间秒杀一切 提交于 2019-12-12 02:10:11

问题


I have the following shape: http://s16.postimg.org/sfhb5wgdx/slime.png and I want to draw it in LibGDx just like that because am using Box2d wand will be used in collisions. I have heard I can used a mesh to create this but there isn't much documentation about drawing anything from an image. Do I seriously have to define all the points myself? Is there a better way to extract a shape from in image?


回答1:


Use Physics body editor https://code.google.com/p/box2d-editor/ this will solve your problem



来源:https://stackoverflow.com/questions/17718244/libgdx-and-box2d-draw-a-custom-shape

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!