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 1627 times)
0 Members and 1 Guest 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()