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

Author Topic: [SOLVED] SFML 2.1 Difficutl to understand the "setOrigin()" "getOrigin()"  (Read 1240 times)

0 Members and 1 Guest are viewing this topic.

sagana

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
We are a small developer group, and we are using sfml to develop a simple sidescroller game. Lokking at the tutorial we have difficulty to understand the origin concept, sorry to bother you.

Thanks!
« Last Edit: October 02, 2013, 08:52:41 pm by sagana »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Have you read this? What exactly is unclear?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

sagana

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
We have read that, but we had hard time to figure out the phrase "The origin is the center point of the three other transformations" because we are not native english speaker.
If i guess correctly the origin is the "started" point for all the 3: position, rotation and scale? if so, when we change the origin of a 32x32 sprite  to (3,3) and we position it (50,50) the actual image start from (47,47)?
I'm sorry for my awful english writing.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Quote
If i guess correctly the origin is the "started" point for all the 3: position, rotation and scale? if so, when we change the origin of a 32x32 sprite  to (3,3) and we position it (50,50) the actual image start from (47,47)?
Correct.
Laurent Gomila - SFML developer

sagana

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Thank you very much! You help us a lot! :)

 

anything