Game Development Community

SetVisible on static shapes

by Daniel Thornton · in Torque Game Engine · 08/21/2005 (3:29 pm) · 4 replies

Having some trouble with this. Is it possible turn a dts visibility on and off in a trigger using the setVisible command? The shape is in it's own datablock (called Pointer) and pointer.setVisible(false); doesn't seem to be working. It's getting called right but says it's an unregonized command. I would just use the gui but I need it to be in 3d specific space. thanks for any help.

#1
08/21/2005 (4:09 pm)
DTS is the rendering library for shapes; there are many object types which use that rendering code. Which one are you using?
#2
08/21/2005 (4:25 pm)
Sorry, not exactly sure what your asking. maybe this will tell you, here's the datablock its in.


datablock StaticShapeData(Pointer)
{
category = "Misc";
shapeFile = "~/data/shapes/staticanims/pointer.dts";
};
function Pointer::onAdd(%this,%obj)
{
%obj.playThread(0,"anim0");
}
function StaticShapeData::create(%block)
{
%obj = new StaticShape()
{
dataBlock = %block;
};
return(%obj);
}
#3
08/21/2005 (5:38 pm)
You can use %obj.setHidden(True / false) for Staticshapes.
#4
08/21/2005 (6:35 pm)
Got it, thanks. Was try to access the datablock name instead of the static shape name.