Characters sharing mesh problem!

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
L_Draven
Posts: 21
Joined: Sun Mar 07, 2004 11:36 am

Characters sharing mesh problem!

Post by L_Draven »

Hi friends.

I have a problem with the characters meshes.

When i load a character file i use smgr->GetMesh(filename) function. casting to skinned mesh for use useAnimationFrom() function.

i.e: AnimatedMesh=static_cast<ISkinnedMesh*>(smgr->getMesh("player.b3d"));

of course animatedmesh var is ISkinnedMesh* type;

Then i use AnimatedMesh->useAnimationFrom("walk.b3d");

All works perfect!!.


But the if I create a new character using the same filename and with the same way, during the game when i play the animation of one character the another character plays the same animation and i can not do that each character play differents animations.

Its because when i load with the same filename, the smgr not create a new mesh and use the same mesh that i have loaded a the first time?? Can i use the same base mesh but different animations using useAnimationFrom() function???

I have searched but i cannot find the solution.
I have removed the mesh from the meshcache after the asigment and in the another character load again and works but the FPS performance dies.
I would like use the same base mesh without remove from meshcache and the load again.

Any idea?.

Thanks in advance guys.
Lambda
Posts: 126
Joined: Wed Feb 27, 2008 3:00 pm
Location: Spain, Huelva
Contact:

Post by Lambda »

i have the same problem.

I am thinking to animate the node "manually", this means to set the joint mode to EJUOR_CONTROL and set the rotation of each joint manually based on the rotation of the selected animation, i have tested this mode but it gave me crazy results xD
Image
L_Draven
Posts: 21
Joined: Sun Mar 07, 2004 11:36 am

Post by L_Draven »

Hi Lambda, i am a spanish user too.

I hope that someone here can help us with this :-).

Cheers.
Last edited by L_Draven on Sat Nov 22, 2008 12:54 pm, edited 1 time in total.
Lambda
Posts: 126
Joined: Wed Feb 27, 2008 3:00 pm
Location: Spain, Huelva
Contact:

Post by Lambda »

L_Draven wrote:Hola Lambda, gracias por tu respuesta!!

Veo que eres español, como yo, soy de la Rioja pero ahora me encuentro trabajando en Barcelona jejej.

La verdad que me extraña que no haya nada para poder hacer lo que queremos, a ver si alguien puede ayudarnos :-).

Un abrazo.
Procura hablar en inglés, esta gente se enfada cuando no se habla en ingles.

---

Try to speak in english, its a forum rule.
Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Could you please let me know what version(s) of Irrlicht you are using.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
L_Draven
Posts: 21
Joined: Sun Mar 07, 2004 11:36 am

Post by L_Draven »

Hi rogerborg, thanks for post.

the version is 1.4.2 from official web, windows version with codeblocks. (not svn versions).

thanks in advance.
Post Reply