Page 1 of 1

Is there some problem about setVisible().

Posted: Fri Apr 28, 2006 9:20 am
by mctheaw
Is there some problem about setVisible().

I get a sub node from scene::IAnimatedMeshSceneNode and hide it with setVisible() function but this function help me nothing.

Here is my code

// loading
scene::IAnimatedMesh* MyAnimatedMesh = 0;
scene::IAnimatedMesh* MyAnimatedMesh = device->getSceneManager()->getMesh("XFile.x");
if(!MyAnimatedMesh)
{
.
.
}
.
.
scene::IAnimatedMeshSceneNode* MyAnimatedMeshSceneNode = 0;
MyAnimatedMeshSceneNode = Device->getSceneManager()->addAnimatedMeshSceneNode(MyAnimatedMesh);
MyAnimatedMeshSceneNode->setMaterialType(video::EMT_SOLID);
MyAnimatedMeshSceneNode->setMaterialFlag(video::EMF_LIGHTING, false);
.
.
// get sub node and hide it with setVisible() function
scene::ISceneNode *MySceneNode = MyAnimatedMeshSceneNode->getXJointNode("Box");
MySceneNode->setVisible(false);


The program works fine except my hiding ISceneNode is still visible. Could anybody help me, Please.

Posted: Wed May 03, 2006 7:43 am
by Katsankat
This is not a problem. The mesh node can be hidden, not the joint.
MyAnimatedMeshSceneNode->setVisible(false)

If you want to hide only the joint and its associated vertices, you have to make it as a separate mesh, and attach it as childnode.