marc_antoine
07-01-2007 08:07:42
i hve done test animation with bones and exported it with oFusion, so i went to the Mogre tutorials and my surprise is that doesn't have tutorial or a snippet or something showing how to run the animations of the loaded meshes... so anybody can point me to a tutorial o something.... i have seen the c++ version but it changes in c#..
in just in case my animation is not working i loaded a mesh that has an animation and that already comes with the sample models in the media folder and is the "fish.mesh"... so by now i have this code in the createScene() ....
SceneManager mgr = win.SceneManager;
mgr.AmbientLight = new ColourValue(1, 1, 1);
mgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_STENCIL_ADDITIVE;
Entity ent = mgr.CreateEntity("Fish", "fish.mesh");
SceneNode node = mgr.RootSceneNode.CreateChildSceneNode("FISHNode");
node.AttachObject(ent);
Animation.DefaultInterpolationMode = Animation.InterpolationMode.IM_LINEAR;
Animation.DefaultRotationInterpolationMode = Animation.RotationInterpolationMode.RIM_LINEAR;
AnimationState ae = ent.GetAnimationState("swim");
ae.Enabled = true;
ae.Loop = true;
the fish mesh loads perfect, but i don't see any animation, what am i missing???... i'm a really noob at OGRE..
in just in case my animation is not working i loaded a mesh that has an animation and that already comes with the sample models in the media folder and is the "fish.mesh"... so by now i have this code in the createScene() ....
SceneManager mgr = win.SceneManager;
mgr.AmbientLight = new ColourValue(1, 1, 1);
mgr.ShadowTechnique = ShadowTechnique.SHADOWTYPE_STENCIL_ADDITIVE;
Entity ent = mgr.CreateEntity("Fish", "fish.mesh");
SceneNode node = mgr.RootSceneNode.CreateChildSceneNode("FISHNode");
node.AttachObject(ent);
Animation.DefaultInterpolationMode = Animation.InterpolationMode.IM_LINEAR;
Animation.DefaultRotationInterpolationMode = Animation.RotationInterpolationMode.RIM_LINEAR;
AnimationState ae = ent.GetAnimationState("swim");
ae.Enabled = true;
ae.Loop = true;
the fish mesh loads perfect, but i don't see any animation, what am i missing???... i'm a really noob at OGRE..