invisible mesh
invisible mesh
Hey, i downloaded this cool engine, but now i have a problem . I would want to load a mesh, but without a texture, so it's invisible. But when i do not declare a texture, the mesh is white. Does someone know a solution?
important is video::EMT_TRANSPARENT_ADD_COLOR
then load a texture 100% black, now its invisible but u still can use collision detection.
// maxerl
scene::IAnimatedMeshSceneNode* fig = 0;
scene::IAnimatedMesh* faerie = smgr->getMesh( "daten/bond.md2");
if (faerie)
{
fig = smgr->addAnimatedMeshSceneNode(faerie);
fig->setPosition(core::vector3df(0,-100,100));
fig->setScale(core::vector3df(2.5,2.5,2.5));
fig->setMD2Animation(scene::EMAT_STAND);
fig->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
fig->setAnimationSpeed(20);
fig->setMaterialTexture(0, driver->getTexture("daten/bond.bmp"));
fig->setMaterialFlag(video::EMF_LIGHTING, false);
}
then load a texture 100% black, now its invisible but u still can use collision detection.
// maxerl
scene::IAnimatedMeshSceneNode* fig = 0;
scene::IAnimatedMesh* faerie = smgr->getMesh( "daten/bond.md2");
if (faerie)
{
fig = smgr->addAnimatedMeshSceneNode(faerie);
fig->setPosition(core::vector3df(0,-100,100));
fig->setScale(core::vector3df(2.5,2.5,2.5));
fig->setMD2Animation(scene::EMAT_STAND);
fig->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
fig->setAnimationSpeed(20);
fig->setMaterialTexture(0, driver->getTexture("daten/bond.bmp"));
fig->setMaterialFlag(video::EMF_LIGHTING, false);
}