SFML community forums
Help => Graphics => Topic started by: Wander on February 03, 2011, 06:13:01 am
-
I've been thinking about this for about 3 days now, but I can't seem to figure out how I'm going to accomplish this task.
What I want to do is create a function that will be able to find a specific point on an sf::Shape and jump straight to it.
In other words, I can type in any coordinate that is on the map and it will find it and take me to it.
Any ideas would be great. :)
-
http://www.sfml-dev.org/documentation/1.6/classsf_1_1Drawable.htm#809f25ae0b3a2015ec8a44fe9f5a0008
Do you mean this one? Check out the SFML source to see how it works.
-
Well, that would work except that to keep accuracy (I have points plotted on the rectangle like a map) id have to move the view, not the rectangle.
-
Erhm? No? It gives the local position of the point you gave to the method. So if you move the rectangle to the right, the same point given to this method won't have the same x value when returned.
Ah well I probably misinterpreted something.