This is my first post so I'd like to begin by thanking niko for this incredible 3d engine. I have been playing with the tutorials and they left me hungry for more built in animators. I created an animator in the same fashion as the FlyCircle and FlyStraight animators. I created a CSceneNodeAnimatorMyAnimator.h and a CSceneNodeAnimatorMyAnimator.cpp. However, I then realized that although the animator specific code is in the .cpp and .h, every animator in the engine is initialized by the scenemanager in (source) CScenemanger.cpp
ex: ISceneNodeAnimator* CSceneManager::createFlyStraightAnimator
So.. my question is..What would be the best way to call my animator that I created. Do I need to modify CSceneManager.cpp and add
ISceneNodeAnimator* CSceneManager::createMyAnimator (and relevant code) and recompile the entire engine? Or is there an easier way? I admit that I'm a beginner and might be doing something wrong here.
Any help would be appreciated.
Creating a new Animator
No, just derive your animator from ISceneNodeAnimator and create it with for example
Now you can add it to every scene node you like. If you don't need it anymore , just delete it with s->drop(). (Don't use delete s).
Code: Select all
ISceneNodeAnimator* s = new CYourSNAnimator();