I found out about this using a debug renderer. When the game starts, everything is in order. But when a collision happens, the sprite's rotation is way larger than its body. The sprite and body match when the body is completely horizontal.
The sprite's rotation origin seems far distant from where it should be. Here's my code:
Sprite sprite = data.sprite; position = body.getPosition(); sprite.setPosition( position.x - sprite.getWidth() / 2, position.y - sprite.getHeight() / 2 ); sprite.setOrigin(position.x, position.y); sprite.setRotation(MathUtils.radiansToDegrees * body.getAngle());
As you can see, I am even trying to set center of its rotation with
setOrigin without success. How can I fix this?