How do I use b3d animations

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
thecodethinker
Posts: 3
Joined: Mon Aug 05, 2013 3:22 am

How do I use b3d animations

Post by thecodethinker »

I'm making a little game where you shoot boxes at other boxes (mostly to teach myself the engine) but I can't figure out how to get b3d animations working. I googled it a bit and found a wiki page but it wasn't really much help as it was only 2 paragraphs and one of them was just explaining the changes in the (then new) animation system.

So... how do I use b3d animations...

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

Re: How do I use b3d animations

Post by CuteAlien »

You load the model with ISceneManager::getMesh. Then you create a node for it with ISceneManager::addAnimatedMeshSceneNode. The animation running by default if it has one. With the IAnimatedMeshSceneNode interface which is returned by that you get some further control.

If the animation is not running the usual reasons are either that the model has no animations or that you didn't add it with addAnimatedMeshSceneNode but for example with addMeshSceneNode instead.
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
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: How do I use b3d animations

Post by mongoose7 »

In other words, you add the animations in the *modeller* and export the animations with the model. But I think you may want something different so try googling for 'bullet' as the standard Bullet examples do what you seem to want.

But if you want to "animate" the blocks yourself, use node->setPosition(() and node->setRotation().
Post Reply