Game Development Community

Tire collision issues

by Unlisted · in Torque Game Engine · 08/29/2007 (9:52 am) · 2 replies

Hello, I'm having issues with wheel collision. See, I've been making a Monster Truck for a game and as you know the wheels on them are big. When I exported my wheels I started playing with them I noticed something very troubling.

The tire would only collide when it was posistioned so it's middle was inside of the interior or static shape on the Z axis.

Heres a screenshot, the blue line is where collision is detected:
img255.imageshack.us/img255/6369/tirecollisiongf2.png
Another screenshot where the side of the tire doesnt collide, just the middle Z axis like I said before:
img128.imageshack.us/img128/1661/collisionsidejd0.png
I instantly went to GG and TDN to try to find a way fix the problem. I found "radius" that goes in the wheel datablock and tried out serveral different values of it and then deleted it from the datablock after seeing it didnt make any changes. I made bounding boxes and cylinders on the wheel with different kinds of names and shapes. Nothing worked. I had my friend export a wheel he made with a bounding box in a different modeling program, that didnt work either. I went into the starter.racing kit to see if the buggy's wheels were like that too, and they were. I then went in a few different torque games and tried out the wheels in them, you guessed it, they did the same thing as the rest.

During all these tests I kept searching GG and TDN for a fix or awnser why this is happening and couldnt find anything. So I finally decieded I would post for help here.

Any help on the subject would be greatly apprecaited since my monster truck really doesnt move around very well without proper collision. Thank you for your time.

Incase you dont like reading:
Wheel collision isnt working with bounding boxs and only collides in the middle of the wheel on the Z axis. Please help.

#1
08/29/2007 (12:13 pm)
This is because WheeledVehicle does not use the DTS collision on wheels. It uses a simple ray cast between the wheel mount position and the radius of the tire in the spring vector direction. Typically this isn't a problem as tires on most vehicles are rather thin and do not act like bumpers.

In your case you need a specialized solution that accounts for the width of the tire and collisions with the front and rear of the tire. While your at it you should try to account for some tire deformation that is typical in monster trucks.

If i were doing this quickly i'd fake it with multiple ray casts which would cover the inner and outer walls of the tire as well as the middle. Then based on those decide what the suspension extension should be.
#2
08/28/2011 (7:07 am)
I have the same issue with tires. Players can walk through them and I catch alot of grief as a result. Would it make sense to add invisible collision boxes to the vehicle where the tires would be?