Game Development Community

Collision doesn't work

by Brandon Fogerty · in Artist Corner · 07/05/2007 (9:34 pm) · 6 replies

I have built a mesh with a cube collision box engulfing it. I titled the collision mesh "Collision1" and used the Torque DTS Exporter and selected Collision Mesh. However when my player collides with the object in game, he passes through it. The same thing happens when I use the updated Torque DTS Plus exporter. Do I need to manually declare a boundingBox in my datablock code? If so, by what units of measure do I write it? What am I doing wrong? thanks in advance!

#1
07/05/2007 (9:48 pm)
Brandon,
Try lower case "collision-1". What you've described should work but it might be case sensitive and put a dash in, since that always seems to work for me (-1 I think has to do with visibility also, but I'm not sure).

Oh, and BTW, stick with the DTSExporterPlus, it has quite a few more features.
#2
07/06/2007 (4:09 pm)
Hey Alan, I tried your suggestion but still no change. Any other ideas? Thanks!
#3
07/07/2007 (12:19 pm)
Here is an update. I am spawning my mesh in the sky. If my player runs under the mesh before it hits the ground, the mesh will stop falling and collide with the player mesh. In others, my mesh will rest on the player's head. But if the player walks away and lets the mesh hit the ground, then the player can walk through the mesh and there is no collision. What is wrong here? I created a collision box around my mesh in ilkshape and called the collision box "collision-1". I have no idea why it isn't working. Any ideas? Thanks!
#4
01/10/2008 (4:53 am)
My collision also cannot work...

1)First i created a simple rod.
2) I created a box and put the rod inside the box.
3)Created a new material called collision
4)Assign the material called collision to the selected box (which is the mesh)
5)Export it out in DTS exporter with the collision mesh option checked

Are the steps above correct?
I need to create a correct dts first b4 i created a collsion script.
#5
01/10/2008 (5:11 am)
The listed steps are not correct to produce working collision meshes.


Step 3. Materials do NOT point to collision meshes; they point to animation Sequences[and texture bitmaps]. Name the MeshGroup "Collision-1", then try.
Step 4. Use the DTSPlus! exporter and not the GG compiled copy, or use the PraireGames version Josh posted a while ago.

good luck!
#6
01/10/2008 (6:58 am)
Thanks Rex....I got it to collide.....thankful for your help