Game Development Community

Animating only model mesh, or collision box too?

by Thomas \"Man of Ice\" Lund · in Artist Corner · 09/04/2003 (12:30 am) · 8 replies

I cant find the answer to this one anywhere, so I wanted to check with you.

I have a small rectangle that rotates arounds its y axis. Its my first animation, so I'm running through this from tutorials and the dts exporter documentation.

When creating the animation I'm rotating the mesh for the model (and it shows up fine in the engine). But I'm very unsure if I should rotate the collision box too.

I did a test without rotating, and then no collisions worked. I then rotated the box and when I collide with the shape my engine crashes.

#1
09/04/2003 (1:43 am)
I dont think you can animate the bounding box, if that iw what you're talking about. The bounding box has to encompass all possible animations. If you mean the collision mesh, (which is seperate from the bounding box), then im pretty sure you can animate that.. but Im not certain (Im a programmer not a modeller ;))
#2
09/04/2003 (1:53 am)
I'm a coder too, so thats my main problem too. :-)

And yes - its the collision mesh that is my "problem" - or question item. Does it need to rotate with the model, or it that automatically handled in the engine from the sequence transformations?
#3
11/05/2004 (8:40 am)
I'd love to hear the answer to this as well.
can the collision boxes be animated? or does it just take whatever they are linked to in the base shape and keep that link as it transforms?

for instance, if I have say a collision box on an arm that's linked to the forearm bone, should it be linked, should it not, does it matter.

I was also curious about the bounding box, but recently found out that that _can_ move around with the animation, and in fact sometimes it seems that it should move arround.
#4
11/05/2004 (8:54 am)
Aren't you using some form of bones? You animate the bone, not the mesh. Since the collision mesh is attached to it as well, it will automatically move as the bones do.
I'm definately not an animator, but this is how I've understood it, and done it. It works well for me.
#5
11/05/2004 (9:13 am)
Hi Erik, that's the question exactly, does the collision mesh move around with the bone as it animates, glad to hear it does. thanks.
#6
11/05/2004 (11:41 am)
Bounds should be linked to the rigs root node so that it follows it around as it moves.
#7
11/08/2004 (4:33 pm)
@Thomas
If your using your shape as a player you only need the bounding box , No collision shape. The bounding box needs to be contrainted to only forward, backward, and Side to Side movement. You do not need to move the bounding box up and down during animation. Animations that require the player to move up and down need to be done within the area of the bounding box. So you bounding box should be as high as your "Jump" animation for instance. The bounds Only needs rotation on the Z axis. Basically to allow it to turn left or right to follow the player.

If your Using the Your box as a "Static Shape With Collsion" and including an animation, by default you do not want to animate the Collision Shape. From what I understand the collision gets Culled out.

There is a MOD for animated Collsion though if you need it. It can be found HERE

Hope that helps
Matt
#8
11/09/2004 (2:07 am)
I use animated collision boxes on my gates that make damage.
You collide with them even when they move.
The only thing i notised if they move to fast the collision not working so well, i tried to make really fast traps but they didnt work.