Collision Meshes

Collision meshes define convex volumes of space that are used for collision detection. Collision meshes are stored within a special detail level known as a Collision Detail Level.  Collision detail levels are created in Blender by specifying one or more scene layers as collision detail levels in the detail levels panel of the exporter user interface.

Important: If collision meshes are not convex, collisions will not work reliably for your shape.  Matt Fairfax has written a great explanation of convex vs concave meshes that is available here: What is the difference between Concave and Convex?.

Best practices:
 
  • The name of each collision mesh should start with "col", otherwise you'll get a console warning when you load your dts shape in Torque.  This warning is non-critical and can be safely ignored or disabled by commenting it out in the Torque source code if you prefer.
  • Collision meshes must be convex!
Important Notes:
  • If a collision detail level does not have a matching numbered LOSCollision detail level, the meshes in the collision detail level will behave as both collision and LOSCollision meshes in Torque.  If you want the line of sight collision volumes to match the regular collision volumes exactly, you don't need to create a LOSCollision detail level; in fact, it would be a waste of time and effort to do so.  See Pairing of Collision and LOSCollision detail levels for more information.
  • Only Blender mesh objects are supported for collision and LOScollision meshes.  Unlike visible detail levels, other Blender object types are not supported.
  

Collision detail levels

Collision detail levels are special detail levels that are used to hold collision meshes.  Meshes in a collision detail level are never rendered on the screen. A collision detail level may contain any number of closed convex collision meshes. 

Note:

  • Versions of TGE prior to 1.4 supported a maximum of 9 collision detail levels.  Newer versions of TGE and TGEA allow an unlimited number of collision detail levels.

Creating a collision detail level

Collision Detail levels are defined through the use of Blender's scene layers.  Closed, convex collision meshes are placed in a given layer, and that layer is designated as a collision detail level via the detail levels panel of the exporter user interface:

See Tutorial: Adding Collision and LOSCollision Meshes for more detailed instructions.

Pairing of collision detail levels and LOSCollision detail levels

Collision detail levels are paired with LOSCollision detail levels on a 1-to-1 basis in Torque based on the numbers contained in the collision and LOSCollision detail level names.  For more information, see the Pairing of Collision and LOSCollision detail levels section of the LOSCollision meshes article.


See Also: