SFML community forums

Help => Graphics => Topic started by: Flaze07 on July 09, 2017, 04:23:32 am

Title: how does Transform::setOrigin works ?
Post by: Flaze07 on July 09, 2017, 04:23:32 am
hi...
for example i have this code
Code: [Select]
rect.setOrigin(rect.getSize().x / 2, rect.getSize().y / 2);
rect.rotate(1);
rect.setOrigin(0, 0);

the rect doesn't rotate according to the origin in the middle but according to the origin of top left
why ?
Title: Re: how does Transform::setOrigin works ?
Post by: Hapax on July 09, 2017, 04:43:28 am
I answered you already on your other thread:
https://en.sfml-dev.org/forums/index.php?topic=22221.msg156741#msg156741
Title: Re: how does Transform::setOrigin works ?
Post by: Flaze07 on July 09, 2017, 05:32:10 am
ah..I see  ;D