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

Author Topic: .SetCenter(float CenterX, float CenterY);  (Read 2933 times)

0 Members and 1 Guest are viewing this topic.

JeZ-l-Lee

  • Jr. Member
  • **
  • Posts: 80
    • ICQ Messenger - 223180991
    • MSN Messenger - JeZLee@Live.com
    • AOL Instant Messenger - SLNTHERO@aol.com
    • View Profile
    • http://www.SilentHeroProductions.com
    • Email
.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...
JeZ+Lee
Silent Hero Productions(R)
Video Game Design Studio

http://www.SilentHeroProductions.com

quasius

  • Full Member
  • ***
  • Posts: 166
    • View Profile
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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
.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.
Laurent Gomila - SFML developer