SFML community forums

Help => General => Topic started by: Flaze07 on July 08, 2017, 05:15:33 am

Title: resetting origin over and over
Post by: Flaze07 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
Title: Re: resetting origin over and over
Post by: Flaze07 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 :'(
Title: Re: resetting origin over and over
Post by: Hapax 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.
Title: Re: resetting origin over and over
Post by: Flaze07 on July 09, 2017, 05:32:20 am
thank you :D