Y johnny can't hide
by Orion Elenzil · in Torque Game Engine · 08/31/2007 (5:13 pm) · 2 replies
Hey Folks -
so in the TGE world editor, the "Hide Selection" option hasn't worked for a long time,
and i'd always assumed i'd broken something,
but in trying to fix it today, i think it may never have worked since at least TGE 1.3.5.
Here's the flow:
1. Hide/Unhide selection set a dynamic script field named "hidden" in the item to true or false.
2. In InteriorInstance::renderObject(), we have:
Seems Good,
except that EditTSCtrl::renderWorld() looks like this:
see the problem ?
i tried having renderWorld() render gServerSceneGraph, but it got some funky errors which i don't want to track down.
so, proposed solution:
have Hide/Unhide selection set the "hidden" dynamic field in the server object and then lookup the client version of the object and if it exists, set it there too.
so in the TGE world editor, the "Hide Selection" option hasn't worked for a long time,
and i'd always assumed i'd broken something,
but in trying to fix it today, i think it may never have worked since at least TGE 1.3.5.
Here's the flow:
1. Hide/Unhide selection set a dynamic script field named "hidden" in the item to true or false.
2. In InteriorInstance::renderObject(), we have:
if(gEditingMission && isHidden())
return;3. isHidden() just returns the value of the dynamic field.Seems Good,
except that EditTSCtrl::renderWorld() looks like this:
void EditTSCtrl::renderWorld(const RectI & updateRect)
{
// .. set some GL states ..
gClientSceneGraph->renderScene();
// ..see the problem ?
i tried having renderWorld() render gServerSceneGraph, but it got some funky errors which i don't want to track down.
so, proposed solution:
have Hide/Unhide selection set the "hidden" dynamic field in the server object and then lookup the client version of the object and if it exists, set it there too.
About the author
#2
it does not seem to work for DTSs, triggers, and spawnspheres,
but that should be easy to fix.
also even when an object is hidden,
it's still selectable, which is a big part of why we want to hide it.
08/31/2007 (5:35 pm)
Uh.. this does seem to be working for interiors. never mind.it does not seem to work for DTSs, triggers, and spawnspheres,
but that should be easy to fix.
also even when an object is hidden,
it's still selectable, which is a big part of why we want to hide it.
Associate Orion Elenzil
Real Life Plus
looking more..