Is there some problem about setVisible().

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
mctheaw
Posts: 4
Joined: Wed Apr 26, 2006 5:46 am

Is there some problem about setVisible().

Post 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.
Katsankat
Posts: 178
Joined: Sun Mar 12, 2006 4:15 am
Contact:

Post 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.
Post Reply