Here's my current code which only gets one of the meshes in the file:
Code: Select all
levelmesh = smgr->getMesh("maps/Tester/test.dae");
if(!levelmesh)
{
// display some sort of error or something here
device->drop();
return;
}
levelnode = smgr->addAnimatedMeshSceneNode(levelmesh);
if(!levelnode)
{
// display some sort of error or something here
device->drop();
return;
}
smgr->setAmbientLight(video::SColor(255, 128, 128, 128));
levelnode->setMaterialFlag(video::E_MATERIAL_FLAG::EMF_LIGHTING, true);
smgr->addCameraSceneNodeFPS();
edit:
I read some stuff on the docs about collada in getMesh and I tried doing this before loading the mesh.
Code: Select all
smgr->getParameters()->setAttribute(irr::scene::COLLADA_CREATE_SCENE_INSTANCES, true);
So I'm still stuck
Oh and I forgot to mention, the meshes in the dae all have textures assigned to them. Some share the same but there are about 5 in the file in total.
Thanks