SFML community forums
Help => Graphics => Topic started by: uGhster on December 25, 2013, 10:37:24 pm
-
Hi,
I have a sf::Drawable that has a sprite that draws a sf::Sprite at 0,0 and it has a specified orgin set. eg. center of the sprite.
From time to time I'd like to rotate the sprite around another origin. Is there a way to do this withouth having to transform the object back and forth. As soon as I change the origin of the sprite it moves since the 0,0 will now have the new position.
-
After some experimenting I figured out that I had to skip the common states.transform *= getTransform(); in draw method and build my own transform. :D works like a charm now.