Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
.SetCenter(float CenterX, float CenterY);
Print
Pages: [
1
]
Author
Topic: .SetCenter(float CenterX, float CenterY); (Read 3491 times)
0 Members and 1 Guest are viewing this topic.
JeZ-l-Lee
Jr. Member
Posts: 80
.SetCenter(float CenterX, float CenterY);
«
on:
February 10, 2009, 03:24:55 am »
.SetCenter(float CenterX, float CenterY);
The above does not work on a previously scaled Sprite.
What am i doing wrong here?
It works on a Sprite of scale 1 only...
Trying to make my game and have wasted hours on this already...
Logged
JeZ+Lee
Silent Hero Productions(R)
Video Game Design Studio
http://www.SilentHeroProductions.com
quasius
Full Member
Posts: 166
Re: .SetCenter(float CenterX, float CenterY);
«
Reply #1 on:
February 10, 2009, 05:22:59 am »
It's probably working, but just not behaving as you expect. How are expecting it to function?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
.SetCenter(float CenterX, float CenterY);
«
Reply #2 on:
February 10, 2009, 08:05:19 am »
The center is set
relatively to the top-left corner in local coordinates
. So it won't take in account any transformation such as scaling or rotation.
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
.SetCenter(float CenterX, float CenterY);