AnimationManager, gets called on the main game loop before drawing all the stuff.
AnimationManger has an UPDATE(s32 deltaTime) method that is actually called.
Animation manager processes it's array of animations(defined below) and checks for ending conditions
And maybe this could be a base class or Interface that you would implement on top of ISceneMesh or some such. Maybe with a little more though that my caffeine induced code rage below
Code: Select all
struct animation {
vector3df start;
vector3df end;
vector3df rotation;
vector3df scale;
f32 speed;
};
I can see that there are lots of ways to represent some kind of animation. Because there are different types of animations, like the main 3: position, rotation, scale. If anyone has any good ideas to add or tell me I am completely wrong, I would love to hear some ideas before I sink time into it. Although after writing this post I don't think it would take that much time to get a rough refactorable draft of an animation manager. I may give it a go this weekend if the idea strikes me again and I might just share
EDIT: I wanted to add that the reason I bring this up is because well besides the obvious need for animations, moving planets around (they don't really need to use physics) and ordering units to move in an RTS game would hugely useful. I do assume that some people on here use Irrlicht to games and maybe those people would like to share a bit of postmortem wisdom with those who don't have such experiences.