Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::Sprite.rotate()  (Read 1630 times)

0 Members and 1 Guest are viewing this topic.

out4blood

  • Newbie
  • *
  • Posts: 1
    • View Profile
sf::Sprite.rotate()
« on: November 11, 2009, 07:03:17 am »
I am doing some rotating on sprites, and I see that the end result is a rotation of the image around its top left corner. Is there any (easy) way to rotate this image around its center instead?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::Sprite.rotate()
« Reply #1 on: November 11, 2009, 08:34:08 am »
Code: [Select]
sprite.SetCenter(sprite.GetSize() / 2.f);
Laurent Gomila - SFML developer