Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

sfml local mouse position

// get the current mouse position in the window
sf::Vector2i pixelPos = sf::Mouse::getPosition(window);
// convert it to world coordinates
sf::Vector2f worldPos = window.mapPixelToCoords(pixelPos);
Source by www.sfml-dev.org #
 
PREVIOUS NEXT
Tagged: #sfml #local #mouse #position
ADD COMMENT
Topic
Name
3+4 =