1
public void draw(ShapeRenderer renderer) {
renderer.begin(ShapeType.Filled);
renderer.setColor(color);
renderer.identity();
renderer.translate(position.x, position.y, 0);
renderer.rotate(0, 0, 1.0f, angle);
renderer.ellipse(-width/2, -height/2, width, height);
renderer.end();
}
旋轉ShapeRenderer時,這是我所得到的與上面的代碼。
來源:http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/ShapeRenderer.html#ellipse%28float,%20float,%20float,%20float,%20int %29 – pixlhero
其實我已經嘗試了自己輸入段數,它不能解決問題。 – madhoe
好的...這個doesen't沒有回答原來的問題,但我的建議是,你可以使用帶有白色圓圈的紋理,然後着色,縮放和旋轉它。 (我不知道天氣比使用shapeRenderer更節省成本...) – pixlhero