So basically I wanna make player1 rotate and always look at the cursor, but I'm stuck. For some reason code below doesn't work
click1Pos.x = (int)sf::Mouse::getPosition(cliff->window).x;
click1Pos.y = (int)sf::Mouse::getPosition(cliff->window).y;
moveToCursor = true;
double one = playerYposition - mouseYposition;
double two = playerX - mouseXposition;
double tanges = (tan(one/two)* RAD);
player1.setRotation(tanges);