elieajaltouni
29-05-2009 19:42:46
I am trying to export animation from 3dMax using Ofusion into ogre.
The .osm file that I got has the xml tags for the animations:
but the problem is when I am loading the scene the mesh with the animation is not moving.
Below is the code I am using to get the scene:
Are there any extra configurations I need to do? what may be the problem?
The .osm file that I got has the xml tags for the animations:
<entity name="Cylinder01" hidden="false" filename="Cylinder01.mesh" CastShadows="yes" ReceiveShadows="yes">
<position x="341.24374" y="167.05254" z="-70.647644" />
<rotation x="-0.70710677" y="0" z="-0" w="-0.70710677" />
<scale x="1" y="1" z="1" />
<animations>
<animation name="Test" loop="true" length="3.33333">
<keyframe time="0">
<position x="341.244" y="167.053" z="-70.6476" />
<rotation w="-0.707107" x="-0.707107" y="-0" z="0" />
<scale x="1" y="1" z="1" />
</keyframe>
<keyframe time="0.0333333">
<position x="341.026" y="167.053" z="-70.6476" />
<rotation w="-0.707107" x="-0.707107" y="-0" z="0" />
<scale x="1" y="1" z="1" />
</keyframe>
......but the problem is when I am loading the scene the mesh with the animation is not moving.
Below is the code I am using to get the scene:
OSMScene oScene;
oScene.initialise("pyramidAni1.osm", NULL);
oScene.createScene();
mSceneMgr = oScene.getSceneManager();
mCamera = mSceneMgr->createCamera("PlayerCam");
mCamera->setPosition(Vector3(0,0,500));
mCamera->lookAt(Vector3(0,0,-300));
mCamera->setNearClipDistance(5);
Viewport* vp = mWindow->addViewport(mCamera);
vp->setBackgroundColour(ColourValue(0,0,0));
mCamera->setAspectRatio(Real(vp->getActualWidth())Are there any extra configurations I need to do? what may be the problem?