dear geniouses

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
Cear
Posts: 45
Joined: Wed Jul 18, 2007 9:31 pm

dear geniouses

Post by Cear »

ok. i wanna load multiple meshes. simple right. well heres my code.
it only loads tree.x
it loads beast as well i just can find it nor can i place it. if i try to place it somewhere i end up placeing another tree.x mesh

Code: Select all


device->getFileSystem()->addZipFileArchive("tree.x");
scene::IAnimatedMesh* mesh = smgr->getMesh("tree.x");
device->getFileSystem()->addZipFileArchive("beast.3ds");
smgr->getMesh("beast.3ds");
scene::ISceneNode* node = 0;

if (mesh)
    node = smgr->addOctTreeSceneNode(mesh->getMesh(0));

    if (node)
    node->setPosition(core::vector3df(150,3,50));
    node->setRotation(core::vector3df(270,0,0));
i figured it somthing really simple.
preciate all the help.
beshrkayali
Posts: 85
Joined: Mon Jun 11, 2007 11:22 am
Location: Damascus - Syria
Contact:

Post by beshrkayali »

I think the appropriate code would be:

Code: Select all

//for the tree
scene::IMesh* tree_mesh = smgr->getMesh("tree.x")->getMesh(0);;

scene::ISceneNode* tree_node = smgr->addMeshSceneNode(tree_mesh);

if (tree_node)
	tree_node->setPosition(vector3df(0.0f,0.0f,0.0f));


//for the beast
scene::IMesh* beast_mesh = smgr->getMesh("beast.3d")->getMesh(0);;

scene::ISceneNode* beast_node = smgr->addMeshSceneNode(beast_mesh);

if (beast_node)
	beast_node->setPosition(vector3df(200.0f,0.0f,0.0f));

Post Reply