Hey, I'm making my first game with SFML, and for one part I need to rotate a sprite depending on the position of the mouse (local to window). The bit I dont quite understand is how you compare the position to another position, if ya get what I mean? I know what I have attempted below probablly doesn't make sense and is a bit random, but as I said this is my first game and I'm only a newbie.
sf::Vector2i mousepos = sf::Mouse::getPosition(window); // get the local position if the mouse
if (mousepos = (sf::Vector2i(-500, -100))
{
player.rotate(90);
}