useAnimationFrom and different models

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
KakCAT
Posts: 10
Joined: Fri May 14, 2010 10:09 am

useAnimationFrom and different models

Post by KakCAT »

Hi!

I'm trying to separate animations from models in a little irrlicht game I'm staring.

i.e. I have several animation files which are loaded at the start into an array ISkinnedMesh *animation[N];

Code: Select all

animStay.x
animWalk.x
animRun.x
...

then I have several models where I apply those animations with useAnimationFrom

Code: Select all

char1.x
char2.x 
...

The problem I have is that the animation is set per model, not per instance. So having 2 char1 instances make me impossible to make one char1 walk, and the other one stay.


Which is the correct workaround / alternative to this approach in irrlicht?


Thanks,
Kak
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Maybe that thread can help you: http://irrlicht.sourceforge.net/phpBB2/ ... m&start=15

Check the code I posted there in the end. I used that in one of my projects (but as you can see it was for 1.6 and no one commented so far if it still works in 1.7 ... I hope it does).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply