Game Development Community

HowTo: Making a Collision Mesh

by Tim Robinette · in Torque 3D Professional · 08/18/2012 (6:38 pm) · 3 replies

I know when you bring a mesh into the game world, you can change the property for collision to "VisibleMesh", and that works fine for simple meshes, but for complex meshes, I don't know really know where to begin on starting to make it. Do I make it in a modeling program as well, or do I do it in the shape editor? How do I attach the collision mesh to the physical mesh so its 1 object when you add it to the game world... and so forth. In our project, I'm basically trying to learn several things from scratch at once, so I feel a bit overwhelmed. So any help is appreciated.

#1
08/18/2012 (6:52 pm)
You can export colmeshes with your model. Alternatively you can use TsShapeConstructor script and add a primative colmesh in ShapeEditor. Read the "artist guide section", the "art primer", the "collada" section and the "shapeEditor" section of the docs for info on colmeshes.
#2
08/18/2012 (6:59 pm)
Just to note: if you're making a "networkable object" eg: a staticshape object or rigidshape object (dynamic early physics objects), you really need to keep the colmesh a convex hull or collision will fail.
#3
08/18/2012 (7:08 pm)
These might help:
http://www.rustycode.com/tutorials/convex.html
http://www.moddb.com/engines/torque-3d/tutorials/torqials-1-multiple-collision-boxes