SFML community forums
Help => Window => Topic started by: DasOhmoff San on December 23, 2015, 10:28:53 pm
-
Using sf::View and sf::Mouse::getPosition(window) does not work together.
I get false values with sf::Mouse::getPosition(window).
I think it is because my view and my window does not have the same size.
And I cannot use window.getGlobalBounds().contains(sf::Mouse::getPosition(window)) too
because of this.
How to fix this?
-
http://www.sfml-dev.org/tutorials/2.3/graphics-view.php#coordinates-conversions
-
http://www.sfml-dev.org/tutorials/2.3/graphics-view.php#coordinates-conversions
Thanks a lot, this solved the problem.