Game Development Community

Skinned with collision meshes crash

by Eric Hartman · in Torque Game Engine · 09/26/2002 (2:16 pm) · 4 replies

I've made a fence object to use as a delpoyable item in my game. I'm using 3d studio max 4 and release1_1_2 of torque. heres what the schematic view looks like
www.filebox.vt.edu/users/ehartman/fenceSchem.jpg
I've animated the fence object with comSkin and 2 points used as bones (top and bottom). Loading the shape in the show tool shows that the animation and the collision mesh appear to be exported properly.

the problem:
When i use the shape in the game, it crashes as soon as anything collides with it. If you delete the col-1 mesh and collision-1 node, it works fine- but of course you can walk through it. I've had this exact shape working fine with a collision mesh and no comSkin. It appears to be the combination of the 2 that breaks it. I believe i have done everything correctly.

here is the .max, .dts and texture file. I really need some kind of response on this.
filebox.vt.edu/users/ehartman/fence.rar

Note: I have read the exporter documentation multiple times. I have exported comSkinned player models and animations as well as animated weapon models, vehicles and static shapes succsessfully.

#1
05/02/2003 (10:08 pm)
I'm experiencing this problem too. I made a camel and skinned it using a biped and the skin modifier. I added the collision-1 dummy and col-1 mesh. It exports fine but crashes the game. I ran in the debugger and found the crash happening when inside of fxSunlight class. It was trying to cast a ray through the camel. Apparently the collision mesh was in bad shape and caused errors.

Checked the console.log and it had this line in there.

Error: shape fps/data/shapes/misc/camel.dts-collision detail 0 (Collision-4) bounds box invalid!

If I take the collision dummy and mesh out it works fine. I have tried many variations on this. Linking the col-1 mesh to the shape's mesh, leaving it unlinked, linking it to the biped. The results are either no collision or crash.

btw. removing the biped also stops the crashing.
#2
05/02/2003 (10:34 pm)
both your link and picture do not work
#3
05/02/2003 (10:35 pm)
For a general shape this is how it goes:

top level is called "shape"

shape -> collision-1 (dummy)
shape -> detail128 (dummy)
shape -> start (dummy)
shape -> LOS-9 (dummy)

next level is for "start"

shape -> start -> mesh128 (mesh)
shape -> start -> cam (dummy)
shape -> start -> eye (dummy)
shape -> start -> col-1 (mesh)
shape -> start -> LOScol-9 (mesh)
#4
05/02/2003 (11:38 pm)
I never use the LOS-# dummy. I have gotten other shapes to work fine without it. Even have a statue of saddam dts that falls over when you shoot it. But the problems start up when I add a biped. Do you think the LOS ommision might be causing problems? I will test it.

The hierarchy, when using a biped, looks more like this (at least mine do):

BIP01
detail2
detail32
detail64
detail128
collision-1
...OTHER BIPED NODES...

myshapename
multires::myshapename
col-1

bounds