SFML community forums

Help => Graphics => Topic started by: Austech on December 06, 2009, 08:41:50 am

Title: Getting Position of a Sprite after it rotated?
Post by: Austech on December 06, 2009, 08:41:50 am
Sorry for all the questions, but Is there a way to get the position of a sprite after it rotated? Because when I try it gets it's original position, not the area that it rotated to.
Title: Getting Position of a Sprite after it rotated?
Post by: Laurent on December 06, 2009, 11:08:59 am
Use this:
Code: [Select]
sf::Vector2f position = sprite.TransformToGlobal(localPoint);

Where local point is the point on the sprite that you want top get the coordinates in global space (example: (0, 0) for its current center).