Animated Textures
Animated Textures
How can I use sequences of textures as animated textures in Irrlicht?
-
- Posts: 395
- Joined: Fri Apr 08, 2005 8:46 pm
CreateTextureAnimator
Code: Select all
IAnimatedMesh* fMesh = m_mgr->getMesh("assets\\fire.obj");
IAnimatedMeshSceneNode* fNode = m_mgr->addAnimatedMeshSceneNode(fMesh);
fNode->setMaterialFlag(video::EMF_LIGHTING, false);
fNode->setMaterialTexture(0, m_driver->getTexture("assets\\b1.bmp"));
core::array<ITexture*> tt(4);
tt.insert(m_driver->getTexture("assets\\b1.bmp"));
tt.insert(m_driver->getTexture("assets\\b2.bmp"));
tt.insert(m_driver->getTexture("assets\\b3.bmp"));
tt.insert(m_driver->getTexture("assets\\b4.bmp"));
ISceneNodeAnimator* sAnim = m_mgr->createTextureAnimator(tt,200,true);
fNode->addAnimator(sAnim);
sAnim->drop(