Game Development Community

Moving TSStatic by keyboard: update issue

by Funky Diver · in Torque Game Engine · 12/08/2004 (8:04 am) · 1 replies

Greetings!

I need to move a TSStatic object by keyboard and so far I can change its coordinates without a problem (sending commands to server and changing the object's transform matrix).

But the refreshing/rendering of the object in a scene does not work. As soon as the object changes its X,Y,Z coordinates, only the bounding box is moved (I see it hitting F11, the World Editor), then if i click that yellow/green box by mouse, the TSStatic object refreshes itself in the new position.

I do the following (%client.arrow_blue is TSStatic object):
function serverCmdBlueArrowDown(%client)
{
  ...
  %arrow_p = nameToID("MissionGroup/Arrow_Blue_" @ %pos);
  %client.arrow_blue.setTransform(%arrow_p.getTransform());
  ...
}

How can I make it refresh as soon as it changes its coordinates? Should I use different type of objects (i.e. ShapeBase)?..


Thank you in advance!

#1
12/08/2004 (8:07 am)
I may be a result of useing staticshape, static objects are not designed to move. Try shapebase you might get better results.