I'm getting ready to work on creating some autonomous objects that can wander around a map. I want to tie them into an AI that can select paths and so on. My first idea for integrating it with the scene graph was to apply an animator (like a fly straight animator) that runs once to an animated mesh node. After the object reaches its waypoint, the AI will pick a new destination. This gets me to my two questions:
First, what happens to an animator that is set to play once, once it finishes playing? Is it still attached to the node, but inactive? If it is, and I then attach another animator to that node, does the expired animator get cleaned up, or is there something I need to do manually to prevent leaks? Or do the expired animators persist until the parent node is destroyed?
Second, will I need to write my own animator that can call a callback when it finishes playing, or is there already one out there?
TIA
SceneNode Animator - plays once, and then?
-
GnarlyHotep
- Posts: 10
- Joined: Tue Aug 14, 2007 6:35 pm
I believe the animators will clean themselves up once they're finished with.
There are no animators with callbacks and lots of people have asked to know when they've finished animating. If you think you can write your own animator then that's great and if you could share it with others here then that's even better! Although you don't really need to write a new animator as you just need to (each frame) check to see if you're close enough (to within a couple of units probably) to your destination.
There are no animators with callbacks and lots of people have asked to know when they've finished animating. If you think you can write your own animator then that's great and if you could share it with others here then that's even better! Although you don't really need to write a new animator as you just need to (each frame) check to see if you're close enough (to within a couple of units probably) to your destination.
