Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
sf::Sprite.rotate()
Print
Pages: [
1
]
Author
Topic: sf::Sprite.rotate() (Read 1628 times)
0 Members and 3 Guests are viewing this topic.
out4blood
Newbie
Posts: 1
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?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
sf::Sprite.rotate()
«
Reply #1 on:
November 11, 2009, 08:34:08 am »
Code:
[Select]
sprite.SetCenter(sprite.GetSize() / 2.f);
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
sf::Sprite.rotate()