Hello!
I want to rotate a sprite in it's own center, my try:
sf::Sprite sprite(*internalTexture[t].texture, sf::IntRect(rect[0], rect[1], rect[2], rect[3]));
sprite.setPosition(sf::Vector2f(x, y));
sprite.move(sf::Vector2f(offx * -1, offy * -1));
if (opacity < 255)
{
sprite.setColor(sf::Color(255, 255, 255, opacity));
}
if (rotation > 0.0)
{
sprite.setOrigin(sf::Vector2f(rect[2] / 2, rect[3] / 2));
sprite.setRotation(-rotation);
}
Actually the position of the sprite is not preserved :/