SFML community forums
Help => General => Topic started by: lockandstrike on November 23, 2013, 11:54:25 pm
-
So I am working with hexagons and the easiest way I found to do this with SFML is set a CircleShape point count to 6. But now I'm implementing a mouse check and I needed the points position but the getPoint() function gives me the position relative to the hexagon bounding rect instead of giving the position relative to the Window. So my question is:
How do I get the point position relative to the window?
-
position of hexagon (bounding rect) + local position of point = global position of point
global position - view position (left-upper corner) = position relative to window
-
Thank you!