I think I have the code for it after using:
void mouseMove() {
float angle = (float) Math.atan2(562 - Gdx.input.getY() - p.getY(), Gdx.input.getX() - p.getX());
angle = (float) Math.toDegrees(angle);
player.setRotation(angle);
}
In this code the player is the sprite. I noticed, without using mouse based rotation, regular rotation doesn’t work. Why wont my sprite rotate?