Code: Select all
node->setMD2Animation(scene::EMAT_ATTACK);
node->setAnimationSpeed(25);
Code: Select all
node->setMS3DAnimaton(scene::idk);
also, how come irrlicht has built in functions for md2?
Code: Select all
node->setMD2Animation(scene::EMAT_ATTACK);
node->setAnimationSpeed(25);
Code: Select all
node->setMS3DAnimaton(scene::idk);
Code: Select all
scene::IAnimatedMesh *boxMesh = smgr->getMesh("resource/test.ms3d");
scene::IAnimatedMeshSceneNode *box = smgr->addAnimatedMeshSceneNode(boxMesh);
smgr->addCameraSceneNode(0, core::vector3df(0, -5, 0), core::vector3df(0, 0, 0), -1, true);
if(box){
box->setMaterialFlag(video::EMF_LIGHTING, false);
box->setAnimationSpeed(25);
box->animateJoints();
box->setMaterialTexture(0, driver->getTexture("resource/texwall.jpg"));
box->setPosition(core::vector3df(0, 10, 0));
box->setRotation(core::vector3df(0, 20, 40));
}
//camera = smgr->addCameraSceneNodeFPS();
//camera->setPosition(core::vector3df(0, 0, 0));
//device->getCursorControl()->setVisible(true);
while(device->run()){
driver->beginScene(true, true, video::SColor(255, 255, 255, 255));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
Code: Select all
scene::IMesh *boxMesh = smgr->getMesh("resource/test.md2");
scene::IMeshSceneNode *box = smgr->addMeshSceneNode(boxMesh);
smgr->addCameraSceneNode(0, core::vector3df(0, -50, 0), core::vector3df(0, 0, 0), -1, true);
if(box){
box->setMaterialTexture(0, driver->getTexture("resource/texwall.jpg"));
box->setMaterialFlag(video::EMF_LIGHTING, false);
//box->setAnimationSpeed(25);
box->setPosition(core::vector3df(0, 0, 0));
box->setScale(core::vector3df(500, 500, 500));
}