Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

sfml 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 #mouse #position
ADD COMMENT
Topic
Name
6+8 =