In radians:
Player.Rotation = Math.Atan2(Mouse.Y - Player.Y, Mouse.X - Player.X)
Okay, so I got this right now for my player class:
public Entity(int x, int y, int width, int height, int health, int speed) {
this.x = x;
this.y = y;
this.health = health;
this.speed = speed;
this.width = width;
this.height = height;
score = 0;
rotation = (int) Math.atan2(MouseInfo.getPointerInfo().getLocation().y - y, MouseInfo.getPointerInfo().getLocation().x - x);
up = false;
down = false;
left = false;
right = false;
collision = false;
}
But, how would I actually let it rotate?