I am using scene2d. Here is my code:
group.addActor(new Actor() {
@Override
public Actor hit(float arg0, flo
You need to convert the Actor's local coordinates into screen coordinates. Assuming your stage is full-screen, you can just use Actor.localToStageCoordinates:
vec.set(getX(), getY());
this.localToStageCoordinates(/* in/out */ vec);
shapeRenderer.filledRect(vec.x, vec.y, getWidth(), getHeight());
Where vec is a private Vector2d (you don't want to allocate a new one on each render call).
This is also assuming that your ShapeRenderer is defined to be map to the full screen (which is the default).
Also, if you switch away from the ShapeRenderer and back to the SpriteBatch, note that the batch is already adjusted to Actor coordinates (and thus you can use getX() and getY() directly with batch.draw(...).