Hi,
I was wondering if their is a way in Irrlicht to use the same animations on other models without needing to remake them.
I am asking this because lets say I have a zombie in my game and he has an animation where he crawls out of the ground. Then I have my player and their is a quest where he is burried alive and crawls out. These are just examples of course but it seems silly to have to remake the animation twice. It seems to me it should be as simple as making a function and calling it 'setAnimation' then you pass an animation number and it will play that animation no matter the mesh. Obviously some models won't be compatible with certain animations but it makes sense to me to have this sort of setup because in my game their will be a lot of player like characters and similarities.
For example a cat and a dog both have four legs so to me it wouldn't hurt to use the same walking animation.
Thanks,
Dan
Irrlicht 3d animation concern
Re: Irrlicht 3d animation concern
You need ISkinnedMesh::useAnimationFrom to use the animation from another skinned mesh.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 51
- Joined: Fri May 30, 2014 12:55 am
Re: Irrlicht 3d animation concern
Thanks mate
-
- Posts: 51
- Joined: Fri May 30, 2014 12:55 am
Re: Irrlicht 3d animation concern
Any code examples the reference in Irrlicht is returning a bool so I am a bit confused how to use this?
Re: Irrlicht 3d animation concern
Check the API http://irrlicht.sourceforge.net/docu/cl ... 361bf142be
Dream Big Or Go Home.
Help Me Help You.
Help Me Help You.
-
- Posts: 51
- Joined: Fri May 30, 2014 12:55 am
Re: Irrlicht 3d animation concern
Ok I get a rough idea, How do I get the skeletal mesh of a node and then set it to another node
Re: Irrlicht 3d animation concern
There are getMesh functions and you can cast to ISkinnedMesh when you know you have one. There could be some threads around the forum when you search for "useAnimationFrom" - maybe one of those helps. Unfortunately we have no official example yet for this use-case.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 51
- Joined: Fri May 30, 2014 12:55 am
Re: Irrlicht 3d animation concern
Ok thanks