I think getting the rect's inverse transform would be like this:
rect.getInverseTransform()
Hope this helps.
sf::Vector2f global = ...;
sf::Vector2f local = entity.getInverseTransform() * global;
rect.Update();
sf::Vector2f global = player.getPosition();
sf::Vector2f local = player.getInverseTransform() * global;
@Hapax
I'm updating the two lines in the while loop.
I meant that you need to update them before you use them. These variables aren't getting used at all. They should probably be inside the Player class.
As with everyone else here, I'm not sure what you trying to do with them, though. Is it that you want the Player::update()'s move to be moved using local co-ordinates, maybe?