我的相机设置为标准化空间(高度为 1 个单位,宽度为 1.5 个单位)。但似乎 ShapeRenderer 的圆形算法仅适用于整数空间。有解决方法吗?
public void create() {
camera = new OrthographicCamera();
camera.setToOrtho(false, 1.5f, 1f);
shapes = new ShapeRenderer();
}
public void drawScene() {
Gdx.gl.glClearColor(1, 1, 1, 1);
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
shapes.setProjectionMatrix(camera.combined);
shapes.begin(ShapeType.Circle);
shapes.setColor(1, 0, 0, 1);
shapes.circle(0.75f, 0.5f,0.5f);
shapes.end();
}