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!
How do I use b3d animations
Re: How do I use b3d animations
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.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How do I use b3d animations
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().
But if you want to "animate" the blocks yourself, use node->setPosition(() and node->setRotation().