SFML community forums

Help => Graphics => Topic started by: JeZ-l-Lee on February 10, 2009, 03:24:55 am

Title: .SetCenter(float CenterX, float CenterY);
Post by: JeZ-l-Lee 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...
(http://silentheroproductions.com/images/LD100_Dev_Screen0.gif)
Title: Re: .SetCenter(float CenterX, float CenterY);
Post by: quasius 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?
Title: .SetCenter(float CenterX, float CenterY);
Post by: Laurent 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.