问题描述
我的形状如下: http://s16.postimg.org/sfhb5wgdx/slime. png ,我想在LibGDx中绘制它,因为正在使用Box2d棒,将在碰撞中使用.我听说我可以使用网格来创建它,但是关于从图像中绘制任何内容的文档并不多.我是否必须自己认真定义所有要点?有没有更好的方法可以从图像中提取形状?
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?
推荐答案
使用物理正文编辑器 https://code.google.com/p/box2d-editor/这将解决您的问题
Use Physics body editorhttps://code.google.com/p/box2d-editor/ this will solve your problem
这篇关于Libgdx和Box2D绘制自定义形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!