Thulsa Doom wrote:Hello,
there might be some help. I wrote a little demo to extend the engine with some additional functionallity.
Ok thank you very much for your help
I'm trying not to touch the original engine to keep my project separated from the underlying libraries.
Anyway I' think I found a sort of workaround for my problem. To keep using the original feature of animateNode() (i.e. the FlyStraightAnimator) and verify a given condition, I just derive from ISceneNodeAnimator a class (say CConditionAnimator) and define:
Code: Select all
void CConditionAnimator::animateNode()
{
// ... my very cool condition here
}
then I create a FlyStraightAnimator, and add BOTH of them to the node I want to be affected by these animators.
IrrlichtDevice calls both animateNode() in sequence, so the first one animate the node, while the second just verifies the condition and acts according to it.
I understand that this is not the best solution, because it relays on the particular implementation of IrrlichtDevice (it works because the calls to animateNode() are done sequentially). Anyway I achieve my goal to have a simple code structure and not to touch Irrlicht code