Hi I'm just starting to learn about LibGDX and I was wondering how to draw an actual circle. I'm using a orthographic camera object and shape renderer but whenever I draw a circle it's more of an ellipse
@Override //Circle paint function
public void paint(OrthographicCamera camera) {
renderer.setProjectionMatrix(camera.combined);
renderer.begin(ShapeType.Filled);
renderer.setColor(Color.CYAN);
renderer.scale(1f, 1f, 1f);
renderer.circle(getX(), getY(), getSize());
renderer.end();
}
//How I initialize the camera
camera = new OrthographicCamera(500, 500);
How it ends up looking:
I mean I don't know about you, but I don't think that'
Your orthographic camera ratio should be the same as the viewport ratio, otherwise perspective gets skewed as you've observed. If your viewport is 1.3 ratio (it looks like it is), the ratio of your camera should be the same.
Try: camera = new OrthographicCamera(650, 500);