libgdx - 删除Box2d CircleShape上呈现的圆形轮廓

时间:2012-04-08 23:57:38

标签: java libgdx

CircleShape circle = new CircleShape();
circle.setRadius(1f);
...
using 
...
batch.draw(textureRegion, position.x - 1, position.y - 1, 
                            1f, 1f,
                            2, 2, 
                            1, 1, 
                            angle);

我用它来设置Box2d碰撞的主体,但我在libGdx中的纹理周围得到一个愚蠢的圆形,即我的纹理精灵(球)在它的顶部有一个圆圈,一条线从中心沿着半径。

有关如何删除叠加圆圈线的任何想法?

2 个答案:

答案 0 :(得分:6)

不是100%肯定,有一段时间没有使用过带有libgdx的Box2d。但是看看你是否有任何Box2DDebugRenderer呈现box2d世界。如果是这样,请不要调用其render()方法。

答案 1 :(得分:1)

是的,取消注释以下行。

debugRenderer.render(world, viewport.getCamera().combined);
相关问题