Game Development Community

Help! I can't the Object Collision to work

by Todd Sell · in Torque Game Engine · 03/14/2002 (4:47 pm) · 12 replies

(Warning I'm new to Torque but seasoned with 3DSMax)I have read thru most of the tutorials and so far I can get everything to work except collision detection. I even tried exporting one of the simple models from the tutorial into our game and it doesn't work either. Collision detection seems to be working fine for: Characters, buildings and terrain but not for objects. I have meticulously searched thru my models and sample models to make sure I have everything setup correctly but to no avail, nothing I do seems to work. As in most cases it is user error. I can only assume that I'm missing a step somewhere.

Any suggestions would be greatly appreciated.

About the author

Recent Threads


#1
03/14/2002 (4:54 pm)
Check the dump file for the exported shape to see if it is in the shape heirarchy. It might be getting culled out, or might be linked incorrectly.

Joe
#2
03/14/2002 (5:06 pm)
Joe,
Thanks for your quick response. I have reviewed the dump file and I think everything is in there (if I understand it corectly). I could email or post the file if you would like to take a look at it?
#3
03/14/2002 (5:23 pm)
hmm this has to be a linkage error ..
im sure of it ..
make sure the collision mesh is linked to the start node
not the scene root node

like this:

Base->Start->Shape
Base->Start->Col-1

and that you have a Collision-1 dummy attached to
Base
like:
Base->Collision-1

this works for me with anything ive tried so far


Edit:
further observations prove that you might need to do whatever xform trick makes you comfortable to the collision mesh if you have been scaling it nasty
#4
03/14/2002 (10:18 pm)
Ok, I think you hit on something with the scaling. I checked my model again and it's setup they way you described.
The model has been scaled a bit. I had to scale it down. I did noticed that in order for the entire object to be selected the bounds around the object had to be about the size the object was originally (before I scaled it).

This may sound stupid but what exactly do you mean by using the xform? Do you mean before I scale it or is there a way I can fix it after I've scaled it?
#5
03/14/2002 (10:23 pm)
Use the box trick to reset the scale of the objects in the scene that have been scaled.

www.garagegames.com/docs/torque/tools/max2dts/section2.html#trans
#6
03/14/2002 (11:50 pm)
Thanks for the help there Joe. I tried that, no change :(
Could there be something on the programming side that could effect the functionality of the collision detection system? I ask this because it seems like I've tried almost every combination and possibility I can think of. Even when I follow the tutorials point by point the collision still doesn't work. Thanks for the suggestions I really appreciate it. I'm still open to any thoughts and/or suggestions. I'll try anything.
#7
03/14/2002 (11:54 pm)
Replace your collision shape with a sinple sphere shape, name it correctly and try to export that. If it is named correcly, and linked correctly, it should work.

Check it in the showtool, see if it is showing up as the lowest detail level.

Also, try the simple shape with collision in the tutorial. It shoudl work jsut fine if it is linked correctly.
#8
03/15/2002 (12:22 am)
I tried your sphere suggestion and the simple shape with collision in the tutorial. Nothing. Something I neglected to mention in my previous post was that it's my understanding that the programmers in our group have made some major modifications. I could be wrong. Just in case here is the hierarchy and naming I used:

base.....(dummy/node)
--------->Collision-1.....(dummy/node)
--------->detail100.....(dummy/node)
----->Start.....(dummy/node)
-------->terminal100.....(mesh)
-------->Col-1.....(sphere)
bounds.....(mesh (box))

It renders in the -show tool and the mission just fine but no collision. BTW, I'm testing the collision with the character model in our game, I don't know if that makes any difference or not. I'm still trying.
#9
03/15/2002 (12:24 am)
Email the max file and the DTS and I will check it out as soon as I am able (might be a day or two though)
#10
03/15/2002 (1:03 am)
Thanks Joe! (Let me know if you don't recieve it)
#11
03/15/2002 (9:39 pm)
I swear, something's awry with the Max exporter and collision meshes.
#12
12/03/2003 (9:36 pm)
It sounds to me like it works for some but not for all... as if some computers have a setup that allows for collision to work perfectly when exporting, and others don't work no matter what is done... strange.