SFML community forums

Help => General => Topic started by: Roose Bolton of the Dreadfort on March 20, 2012, 06:43:46 am

Title: Animation in SFML 2.0.
Post by: Roose Bolton of the Dreadfort on March 20, 2012, 06:43:46 am
Whats the best way for animation? EG. moving through a big sprite sheet in SFML 2?

I noticed it had a textureRect property? Does this mean we can use that to decide where in the sprite sheet we want to be and move dynamically when we want?

when I wrote a 2D engine for University, we used FrameRect's, and they where so flexible and easy to use thats why I ask.

Cheers.
Title: Animation in SFML 2.0.
Post by: Laurent on March 20, 2012, 07:52:00 am
Quote
I noticed it had a textureRect property? Does this mean we can use that to decide where in the sprite sheet we want to be and move dynamically when we want?

Yes.

Look at all the animation codes on the forum, wiki and in SFML-related projects, there are several sources of inspiration ;)