animated .X Files help

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Tubby2877
Posts: 12
Joined: Fri Sep 12, 2008 1:54 pm

animated .X Files help

Post 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));
	}
tprochownik
Posts: 7
Joined: Wed Sep 10, 2008 10:19 am

Re: animated .X Files help

Post by tprochownik »

if you use panda exporter with default values (3ds max thicks, matrix key) you should use around setanimationspeed(3000)
frostysnowman
Posts: 83
Joined: Fri Apr 11, 2008 3:06 am
Location: Beaverton, Oregon, US

Post 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".
Tubby2877
Posts: 12
Joined: Fri Sep 12, 2008 1:54 pm

thanks

Post by Tubby2877 »

Thanks Frosty

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

Thanks for the prompt reply
Post Reply