Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Get mouse position based on view. (sf::Mouse::getPosition(window) does not work)  (Read 12342 times)

0 Members and 1 Guest are viewing this topic.

DasOhmoff San

  • Guest
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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Laurent Gomila - SFML developer