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 13597 times)

0 Members and 2 Guests 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: 32498
    • View Profile
    • SFML's website
    • Email
Laurent Gomila - SFML developer


 

anything