This is the code to make the faerie.
Code: Select all
// add a animated faeries.
video::SMaterial material;
material.Texture1 = driver->getTexture("../../media/faerie2.bmp");
material.Lighting = true;
scene::IAnimatedMeshSceneNode* node = 0;
scene::IAnimatedMesh* faerie = smgr->getMesh("../../media/faerie.md2");
scene::ISceneNode* faerienode = 0;
if (faerie)
{
node = smgr->addAnimatedMeshSceneNode(faerie);
node->setPosition(core::vector3df(0,30,0));
node->setMD2Animation(scene::EMAT_RUN);
node->getMaterial(0) = material;
}
material.Texture1 = 0;
material.Lighting = false;
I have this after i make the faerie.
Code: Select all
// set camera to faerie
camera->setTarget(faerienode->getPosition);
131 C:\irrlicht\projects\fps\main.cpp
`faerienode' undeclared (first use this function)
When i place it after i get:
153 C:\irrlicht\projects\fps\main.cpp
no matching function for call to `irr::scene::ICameraSceneNode::