Good day! The game has a sprite

private Sprite planet; 

This sprite must be rotated smoothly around its axis. In the render method, I write

 planet.setRotation(90); batch.draw(planet, 0, midPointY + 70, 136 * 1.5f, 137 * 1.5f); 

those. so it should be rotated 90 degrees, but the rotation does not occur.

First question: why does not turn?

Second: how to make rotation?

Thanks a lot in advance!

    1 answer 1

    Using batch.draw for sprite is wrong, use planet.draw(batch) correctly.

    • Did as you wrote, now everything is spinning, but now there is a distortion of the image. Do not tell me how to fight this effect? - Rumato
    • That is distortion? Does this happen only with this object or with all after adding this line? - gt22
    • only with this object - Rumato