6
\$\begingroup\$

Is there any way to increase the width of the line that makes up the shaperenderers circle?

shape.begin(ShapeRenderer.ShapeType.Line);
shape.setProjectionMatrix(batch.getProjectionMatrix());
shape.setColor(1, 0.53f, 0.53f, 1);

shape.circle(nest.getCenter().x, nest.getCenter().y, radius, 500);

If not, is there any other approach that can give a similar effect?

\$\endgroup\$
  • \$\begingroup\$ I don't know much about libGDX, however, you could draw multiple circles at varying radius (same position), and thicken the line in a non-efficient manner. \$\endgroup\$ – jgallant Nov 4 '15 at 17:49
  • \$\begingroup\$ Yeah That was kinda plan B :D haha \$\endgroup\$ – Green_qaue Nov 4 '15 at 18:17
5
\$\begingroup\$

Set the OpenGL line width.

Gdx.gl.glLineWidth(32); // Or whatever thickness you need

// Then render the lines or circles as per what you're currently doing 
shape.begin(ShapeRenderer.ShapeType.Line);
shape.setProjectionMatrix(batch.getProjectionMatrix());
shape.setColor(1, 0.53f, 0.53f, 1);

shape.circle(nest.getCenter().x, nest.getCenter().y, radius, 500);
| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.