Game Development Community

Collision Meshes in Blender for Vehicles

by Matthew Genge · in Artist Corner · 02/05/2012 (6:43 am) · 1 replies

Dear All,

I am trying to set-up a wheeled vehicle created in Blender and exported as a collada file but can't find a way to create a collision mesh properly. I've tried creating a mesh as a seperate object in Blender that surrounds my vehicle, this appears as a node in the shae editor with the root as it's parent when imported but it isn't recognised as a collision mesh. I've tried calling it Collision-1, collision-1, collision1, Col-1, col-1 etc but no luck. I've also tried creating a bone called each of these names and rigging the mesh to that bone. I've tried parenting that bone to the root of the armature and having it as unparented...still the mesh isn't recognised as a collision mesh.

I've also tried importing a model without a collision mesh then defining the collisions in the shape editor. This generates a collision mesh that almost works, however, the mesh resizes to considerably larger than the model and prevents the vehicle from moving and makes it fall through the ground. When I resize the collision box the changes are lost when I next open the shape editor, even though it is saved.

Anyway....my question is....how do you create a working collision mesh in Blender 2.5+ that will be recognised by Torque3d. Does the collision mesh need to be parented to a bone? Does the bone need a specific parent relationship to the root bone? Is there a specific naming convention? Is there a way to specify this as detail 0? Nothing I have tried works. Pulling my hair out (even though I don't have any).

Many thanks,
Matt

#1
02/05/2012 (12:40 pm)
Figured it out myself through trial and error.

Create a mesh as a separate object in Blender, call it something like Col...doesn't seem to matter what. Don't assign a material to it. Doesn't need to be a child of the armature. In the shape editor goto the collision tab under advanced properties and select a Fit Type (10-DOP X worked for me), then in Fit Target select the collision mesh.

Seems to work. Now if I can only get the steering animation to work.

Matt