Game Development Community

Offset bounding box?

by John Quarles · in Torque Game Engine · 03/15/2005 (6:50 pm) · 2 replies

I created a new class of objects that extends ShapeBase, called TrackedShape. Each frame, I compute a transformation matrix in the setTransform() and setRenderTransform() functions of my class. It translates and rotates correctly but the bounding boxes that I see in the editor are offset. This only happens when I perform a translation. Here is a picture: http://www.cise.ufl.edu/~jpq/boundingbox.jpg

How do I update the bounding box so that it is in place with my object?

#1
03/15/2005 (7:03 pm)
Try making your bounds a child to the shape mesh.
#2
03/15/2005 (7:20 pm)
Do I do that inside the dts file? Or can I specify that in the code?