Page 1 of 1

animated .X Files help

Posted: Fri Oct 03, 2008 5:08 pm
by Tubby2877
hello everyone

Currently working on a game and we are using the .X files, we are currently trying to use the normal animation
setframeloop and setanimationspeed but to no avail,

can someone please help us here

Code: Select all

this->mesh = pEngine->GetSmgr()->getMesh("./Resources/Meshes/SpaceBee.X");
	this->mesh->setMaterialFlag(video::EMF_LIGHTING, false);
	this->node = pEngine->GetSmgr()->addAnimatedMeshSceneNode(mesh);
	if (node)
	{		
		node->setMaterialTexture( 0, pEngine->GetDevice()->getVideoDriver()->getTexture("./Resources/Textures/SpaceBee.tga") );
		node->setFrameLoop(0,30);
		node->setAnimationSpeed(3);
		
		//Create a random position for the bee ships to fly over the player.
		//Will be within a boundry of the tunnel
		node->setPosition(vector3df(0, 0, 0));
	}

Re: animated .X Files help

Posted: Fri Oct 03, 2008 8:12 pm
by tprochownik
if you use panda exporter with default values (3ds max thicks, matrix key) you should use around setanimationspeed(3000)

Posted: Fri Oct 03, 2008 8:26 pm
by frostysnowman
Actually, the better way of exporting from 3ds Max using the Panda Exporter to Irrlicht can be found in this thread, ticking "Key Frames".

thanks

Posted: Fri Oct 03, 2008 10:34 pm
by Tubby2877
Thanks Frosty

That did exactly what we needed it to do and now we have ANIMATION YAY!!!

Thanks for the prompt reply