SetTransform's odd behavior
by Bill Vee · in Torque Game Engine Advanced · 04/15/2008 (1:52 pm) · 5 replies
Some objects when you use setTransform on them both in C++ and script will not move the object to the new location until you click on it's bounding box in the editor.
In C++ I have tried setting an object with setTransform and setRenderTransform with the same results.
This only happens with some objects and not others.
A sound emitter will move when you use setTransform but a static shape will not but the bounding box and the ID marker will move then if you click on the bounding box the static shape jumps to the right position.
I would really like to know how to set a static shape from script and it move correctly.
In C++ I have tried setting an object with setTransform and setRenderTransform with the same results.
This only happens with some objects and not others.
A sound emitter will move when you use setTransform but a static shape will not but the bounding box and the ID marker will move then if you click on the bounding box the static shape jumps to the right position.
I would really like to know how to set a static shape from script and it move correctly.
#2
I was using the static shape as an example.
It really is several atlas files.
Basically I have a class that creates several objects that must be very precisely aligned to one another.
In my class I have variables that allows for the individual objects to be adjusted via a Point3F.
The idea was to change the datablocks values and see the results in game immediately.
But the way it is now is I have to make the change then click on the atlas terrain then click back on the PlanetObject then scroll down to the field make another adjustment and so on.
04/15/2008 (4:11 pm)
Not so much as move a object as place it.I was using the static shape as an example.
It really is several atlas files.
Basically I have a class that creates several objects that must be very precisely aligned to one another.
In my class I have variables that allows for the individual objects to be adjusted via a Point3F.
The idea was to change the datablocks values and see the results in game immediately.
But the way it is now is I have to make the change then click on the atlas terrain then click back on the PlanetObject then scroll down to the field make another adjustment and so on.
#3
04/15/2008 (5:01 pm)
I've noticed some odd behavior when moving stuff with the world editor open. does it work fine outside the world editor?
#4
If you use the setTransform function from the console the object will not move but the bounding box and ID marker will. You have to select the object to get it's render transform to catch up.
I can make changes , select terrain to make it move, go back to editor and save then reload mission and it works fine.
Just can't get it to update in real time without selecting the object after each adjustment.
I just checked TGE 1.5 and 1.4.2 and TGEA 1.0.3 and they all do this.
Objects that are tickable seem to move fine(not 100% on this) as would be expected.
But the objects derived from SceneObject appear to have the odd SetTransform behavior .
04/15/2008 (6:34 pm)
@Ramen-samaIf you use the setTransform function from the console the object will not move but the bounding box and ID marker will. You have to select the object to get it's render transform to catch up.
I can make changes , select terrain to make it move, go back to editor and save then reload mission and it works fine.
Just can't get it to update in real time without selecting the object after each adjustment.
I just checked TGE 1.5 and 1.4.2 and TGEA 1.0.3 and they all do this.
Objects that are tickable seem to move fine(not 100% on this) as would be expected.
But the objects derived from SceneObject appear to have the odd SetTransform behavior .
#5
I simple needed to update the object I was moving with setMaskBits().
05/04/2008 (8:27 pm)
I found a solution to my problem.I simple needed to update the object I was moving with setMaskBits().
Torque Owner Jason "fireVein" Culwell