Hi,
I'm using .X animated models to show into the scene the main characters of a game I'm developing using Irrlicht. My .X files contain several animations organized in several animation sets, each of them identified by a string name.
When loading the models, I call the irr::scene::ISceneManager::getMesh function to obtain the IAnimatedMesh pointer. Then I use it to call the irr::scene::ISceneManager::addAnimatedMeshSceneNode function to add the SceneNode. Up to this point, everything is ok.
Problems start when I want to set the current animation for a specific SceneNode. As I want to do it using the name of the animation, I guess I should use the irr::scene::IAnimatedMeshX::setCurrentAnimation method.
As I only can acces to the IAnimatedMeshSceneNode (because I don´t keep a pointer to the IAnimatedMesh when I load the .X file), how can I access to the IAnimatedMesh asociated to my IAnimatedSceneNode? Is there any other simpler way to do this?
Thx.
Help animating .X models
Yes, I already knew the irr::scene::IAnimatedMeshSceneNode::setFrameLoop method. However it requires knowing the begin and end frame numbers of each animation, and the .X file must contain all the frames in one big animation.
Perhaps I didn´t explain very well what I mean. What I want is to activate an animation calling it by its name (i.e. "Walk", "Stand", "Run", ...), cause the animations in my .X files are stored in that way.
If it were .MD2 files, I could activate them calling to irr::scene::IAnimatedMeshSceneNode::setMD2Animation (directly from the SceneNode), but it doesn't exist a similar method for .X files.
So there is irr::scene::IAnimatedMeshX::setCurrentAnimation which lets to activate an animation stored in an .X model. As long as I know, when you call this method over an IAnimatedMeshX, all the IAnimatedMeshSceneNodes asociated to the mesh displays the new animation.
The problem is that the only moment I have access to de IAnimatedMesh is when I load the model. I wanna know if there is any method in IAnimatedMeshSceneNode (or any other way) to get the Mesh I previously loaded at any moment I want to set a new animation.
Greetz
Perhaps I didn´t explain very well what I mean. What I want is to activate an animation calling it by its name (i.e. "Walk", "Stand", "Run", ...), cause the animations in my .X files are stored in that way.
If it were .MD2 files, I could activate them calling to irr::scene::IAnimatedMeshSceneNode::setMD2Animation (directly from the SceneNode), but it doesn't exist a similar method for .X files.
So there is irr::scene::IAnimatedMeshX::setCurrentAnimation which lets to activate an animation stored in an .X model. As long as I know, when you call this method over an IAnimatedMeshX, all the IAnimatedMeshSceneNodes asociated to the mesh displays the new animation.
The problem is that the only moment I have access to de IAnimatedMesh is when I load the model. I wanna know if there is any method in IAnimatedMeshSceneNode (or any other way) to get the Mesh I previously loaded at any moment I want to set a new animation.
Greetz
yep, it works (I read that in the other thread..) But it has quite a lot of quality problems, compared with x. Or even with md3.
Now, if wanna keep artists unhappy..hehe.
Now, if wanna keep artists unhappy..hehe.
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com