SFML community forums
Help => Graphics => Topic started by: fixus971 on July 29, 2008, 08:21:02 am
-
Hi. Is possible to have a sprite offset different from sprite center?
I use sprite.setposition in absolute mode and not in relative
so at every frame I have to add an offset.
Now I use setcenter for this but if next I have to rotate the sprite what I get?
In alternative there is a mode to set an offset for all sprites or an offset of render window?
Thanks
-
Hi. Is possible to have a sprite offset different from sprite center?
Sorry I don't get it. Why can't you just add this offset to your absolute position ?
In alternative there is a mode to set an offset for all sprites
You can have a container of sprites by simply deriving from sf::Drawable ; you can then see it as a single drawable object with its one translation, rotation, scale on top of the contained sprites properties.
or an offset of render window?
Use sf::View.
-
1000 Thanks Laurent, I'll go to try sf::View that can be a good solution for my application that at the end need 2 similar view in one window. bye-bye