Game Development Community

TriggerObject setTransform and ShapeBaseObject setTransform are different?

by JesseL · in Torque 3D Professional · 06/05/2009 (12:55 pm) · 4 replies

I was wondering why when I place a Trigger object based object into game with SetTransform the Rotation and placement of a 2 by 4 by 2 object is 2+ offset on the Y axsis then the ShapeBasedObject and InteriorBased Object.

About the author

I just realized that if I wanted to create a cat that caught on fire and ran up a telephone pole and then burst into a blue waterfall. That wouldn't be to hard!


#1
06/05/2009 (2:02 pm)
Because the pivot of the trigger is in one of its corners, not on its center. This is due to the default polyhedron. The polyhedron below will create a trigger that's centered in the X and Y position, but has the Z on its bottom (makes it easier to place on the ground):

polyhedron = "-0.5 0.5 0.0 1.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 1.0";
#2
06/05/2009 (7:27 pm)
That is an easier to edit polyhedron =)

I am making that the new default for Beta 3.
#3
06/06/2009 (8:21 am)
ok now its only .5 on X axsis and -1 on Y axsis. So that means I'm getting closer ! wooot! This is on a scaled 1 2 1 trigger btw. But at least it rotates correctly now
#4
06/17/2009 (9:48 am)
Ok this is the Polyhedron I was looking for:
$Trigger::Test = "0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0";