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

Author Topic: resetting origin over and over  (Read 1907 times)

0 Members and 1 Guest are viewing this topic.

Flaze07

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
resetting origin over and over
« on: July 08, 2017, 05:15:33 am »
hi, so I want to reset origin over and over :)
so it went like this
when I want to rotate the origin will be at the middle
when I want to check if the shape is out of window, the origin will be either top-left or bottom-right
does setting the origin over and over cause speed difference

Flaze07

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
Re: resetting origin over and over
« Reply #1 on: July 08, 2017, 05:27:34 am »
nevermind, my plan didn't work out...
when it check if the shape is out of window, the origin is still in middle :'(

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: resetting origin over and over
« Reply #2 on: July 08, 2017, 06:13:29 pm »
The origin is the part of the "local" object that is placed into the object's global position.
The origin is only used at the time of drawing (or manual use of the object's transform) so only the last set value for the origin is used.

If you want to rotate around a separate origin to the translation origin (the one you use for position), for example, you will need to combine your own transform.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Flaze07

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
Re: resetting origin over and over
« Reply #3 on: July 09, 2017, 05:32:20 am »
thank you :D

 

anything