Game Development Community

How to animated collision box for dts

by Mark Harmon · in Torque Game Engine · 04/09/2003 (4:46 am) · 5 replies

I am having trouble figuring out how to animate the collision box for my dts shape. I have made sure that the bounding box is large enough to encompass the dts through it's animation. I have also animated the collision model to match the movement of the static shape.

When I play the animation, the shape moves but the collision box doesn't

Is what I am trying to do possible? If so what am I doing wrong?

#1
04/09/2003 (10:43 am)
from what I understand the supplied collision box code is static and does not support animation, I know there are some tutorials in the resources on how to add animated collision boxs for location specific damage that might help.
#2
04/09/2003 (11:06 am)
What are you using to view your collision boxes in the game?
#3
04/09/2003 (3:07 pm)
Jarrod: Thanks, I will search the resources for those tutorials.

Will: I am not viewing the collision box. I am just running into the object at it's current location to see if the collision box is there. The shape animates to it's new position but the collision box stays where it was. Is there a way to view th collision box easily?
#4
04/09/2003 (9:14 pm)
Go to the shapebase.cc file, and run a search for:

// Debugging Bounding Box
   if (!mShapeInstance || gShowBoundingBox) {

This is located in the ShapeBase::renderObject(..) method. If you dont want to worry about gShowBoundingBox, change that to:

// Debugging Bounding Box
   if (!mShapeInstance || gShowBoundingBox || 1) {

And you'll see your collision mesh in red.
#5
04/10/2003 (8:52 am)
@Jared - bounding box != collision box so your code will show the "bounding box" in red, the collision box(s) are different