animation initializing doesn't work

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
jadephoenix1988
Posts: 14
Joined: Fri May 29, 2009 2:12 pm

animation initializing doesn't work

Post by jadephoenix1988 »

Hey guys :).

I've modeled an animation in blender and exported it in the .md2 format.

now i want to display it on the screen:

Code: Select all

mesh = smgr->getMesh("media/simplelemming2.md2");
	lemmingNode2 = smgr->addAnimatedMeshSceneNode(mesh);
	
	//DreiDElement DreiD;
	if (lemmingNode2){
		//debug = true;
		anim = smgr->createFlyStraightAnimator(core::vector3df(100,0,60),core::vector3df(-100,0,60), 10000, true);
		lemmingNode2->addAnimator(anim);
		lemmingNode2->setAnimationSpeed(0);
		lemmingNode2->setFrameLoop(0,180);
		lemmingNode2->setCurrentFrame(25);
		anim->drop();
		lemmingNode2->setMaterialTexture( 0, driver->getTexture("media/simplelemming2.bmp") );  //sydney
		lemmingNode2->setMaterialFlag(EMF_LIGHTING, false);
		lemmingNode2->setMD2Animation(scene::EMAT_RUN);	
		
		lemmingNode2->setPosition(vector3df(0,0,0)); //  0,50,0)
		lemmingNode2->setScale(vector3df(25,50,25));
	}
there is only displayed the model with textures, but without animation! what am I doing wrong?

Thanks
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

jadephoenix1988 wrote:

Code: Select all

.
.
.
lemmingNode2->setAnimationSpeed(0);
.
.
.
maybe you should give it at least a little bit of animation speed ??? :lol:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
jadephoenix1988
Posts: 14
Joined: Fri May 29, 2009 2:12 pm

Post by jadephoenix1988 »

yeah, sorry :P. there stands now 30 (it's frames per second, right?).
But nothing happens :O
jadephoenix1988
Posts: 14
Joined: Fri May 29, 2009 2:12 pm

Post by jadephoenix1988 »

With Sydney it works!

Why not with my model?
I used bones in blender - should i just set keyframes to model? i think i did something wrong with the animation :((
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

hmmm, ok...
another guess:
jadephoenix1988 wrote:

Code: Select all

.
.
.
lemmingNode2->setMD2Animation(scene::EMAT_RUN);
.
.
.
try it without this line, maybe there is no EMAT_RUN defined in the mesh ???
if this also isn't the error, maybe there's something wrong with the mesh itself ???
you should make a download for the mesh then, so we can test the mesh... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
jadephoenix1988
Posts: 14
Joined: Fri May 29, 2009 2:12 pm

Post by jadephoenix1988 »

YUUUHUUU :D:D that was the fault :D!

I love you :D. Thanks for the great help :D:D!!!
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

you're welcome !!! ;)

oh, and yes, it's frames per second for the animation speed...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply