Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Render between batches using scene2d actor
final Matrix4 camera = stage.getCamera().combined;
Actor customActor = new Actor() {
@Override
public void draw (Batch batch, float parentAlpha) {
batch.end();
shapeRenderer.setProjectionMatrix(camera);
shapeRenderer.begin(ShapeType.Line);
shapeRenderer.setColor(1, 1, 0, 1);
shapeRenderer.line(1, 1, 100, 100);
shapeRenderer.end();
batch.begin();
}
};
stage.addActor(customActor);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.