AggrorJorn Posted May 28, 2010 Share Posted May 28, 2010 I have a mesh placeholder that I drag in my scene. The placeholder loads several other models that are parented to the main model. When I try to hide the main model it also hides it's children. function class:CreateObject(model) local object=self.super:CreateObject(model) self.modelA = LoadModel("abstract::modelA.gmf") self.modelA:SetParent(object.model) object.model:Hide() --self.modelA:Show() Does anybody know how to show a child while the parent remains hidden. Quote Link to comment Share on other sites More sharing options...
ZioRed Posted May 28, 2010 Share Posted May 28, 2010 From wiki: Hiding is recursive; If an entity is hidden, all its children will be as well. So I suppose you can only hide the model and then cycle through each of its children and manually Show them. Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
Flexman Posted May 28, 2010 Share Posted May 28, 2010 I don't think you can get around it. We ran into a similar need and got around it by having two meshes. Swapping them in/out was quite fast (same model with bits chopped out using same materials). Not quite the same thing as yours though. Perhaps you could paint the parent entity with the "invisible" material when you want to hide it, and paint it with it's normal material when you want to display it again. PaintEntity(entity,"abstract::invisible.mat",0) Where 0 means "non recursive". ?? Just a thought. Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
AggrorJorn Posted May 28, 2010 Author Share Posted May 28, 2010 Thanks for your answers. It seems that using a simple show command for the children wont work. I will try the invisible material way. thanks. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted May 29, 2010 Author Share Posted May 29, 2010 I did not know that there was an invisible material! I thought you guys ment a black texture that then uses alpha rendering. this works great. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.