1
Graphics / Re: Am I setting the position (sf::Sprite::SetPosition) of the center of the sprite?
« on: February 19, 2013, 08:51:39 pm »
I just found this:
Thanks a lot.
SetCenter is not the center (middle) of the shape, which would have to be calculated from the points.
SetCenter is the center (origin) of all transformations that you apply to it (SetPosition, SetRotation, SetScale), it changes only if you call SetCenter so it is always (0, 0) by default.
It is easy to see that the shape's points and the center are completely unrelated: the formers are defined in sf::Shape while the latter is a generic attribute defined in sf::Drawable (which known nothing about its derived classes).
And yes, "center" is a confusing name, it was renamed to "origin" in SFML 2
Thanks a lot.