I googled and could not find a good explanation.
Currently, when I am creating the entity, this is done:
getSprite().setOrigin(getSprite().getWidth() / 2, getSprite().getHeight() / 2);
getSprite().setPosition(getBody().getPosition().x, getBody().getPosition().y);
This is where the sprite is rendered, which is undesirable. I know it is because the Body is rendered at a point using its center and the sprite is rendered at a point using its bottom-left corner. I attempted changing the origin of the Sprite, but this changed nothing when being rendered, as seen above. The position of the Sprite was the same with or without changing the origin. I think the origin only has to do with scaling and rotating, but I may be wrong.
Can anyone tell me how to make the sprite always center on the Box2D body? Thank you.