Game Development Community

Collision problem in the racing exemple

by Gilles Jr Lafrance · in Torque Game Engine · 10/12/2002 (9:50 pm) · 9 replies

Here's my problem : I have made a model (barrier) with 3D Studio Max and I have included a bounding box, and collision (Col-1, Collision-1). I have followed the DTS Exporter doc. All is working great and the collision is working, but when I collide onto it, the buggy stop for about 1-2 sec before It can move again. It's like if the screen was "frozing" for a couples of seconds. Do you think it's something with my collision on the model or is it something that I have to script somewhere ? It doesn't do this with the others objects included in the racing demo so I guess it's probably my model ?

#1
10/13/2002 (10:13 am)
hehe, I solved this by putting a sign onto the fence were you can read "WATCH OUT, STICKY FENCE" ! lol

Naw, I discovered that when the buggy hit something at 90 degree, he stop right there and the tire are spinning, keeping the buggy into the fence (or object). There is no rebounds in that situation. I will have to figure how to do rebounds. Someone can help with this ? :)
#2
12/10/2002 (10:42 pm)
*bump*
#3
12/10/2002 (11:42 pm)
If I understand your problem correctly, Tim Gift is aware of problems like this in the vehicle physics.

Tim Gift has also submitted a bug here regarding this issue which has yet to be resolved. They are pretty busy guys at the moment.

Hope this helps,

- Melv.
#4
12/28/2002 (7:31 pm)
I don't know if this applies to your problem, but was able to greatly reduce the number of times this happens by making sure that the collision mesh COMPLETELY encases the mesh.

I was able to go from having this happen everytime I collided with an object to *almost* never.

Hope that helps.
#5
01/18/2003 (9:10 am)
Getting closer to having time to work on this! In general though, making the sure the shapes have the minimum number of collision surfaces can help. For ground vehicles, you also want to make sure the mount point for the springs is contained within the collision mesh.
#6
01/18/2003 (11:06 am)
Thanks for these infos guys. I've been able to make my cols on the fence and my vehicles ok now. No more sticky fence, Oh NO ! That was cool to push your friend in it when in multiplayer, hehe. NOT !

Tim,

Good news that you will soon have the time to work on this. I will take this oppotunity to ask you a couple of little questions we couldn't solve :)

1 - When you say "to make sure the mount point for the springs is contained within the collision mesh", is it only at frame 0, or including the animation of the hubs too ?(hub UP and hub Down).

2 - We've found that when our wheels are big, when you jump, apply the brakes, hit the ground with brakes still applied, the wheels roll a little with the force of the car. That is perfect feel and natural. But when the wheels are little (like those of the demo buggy), they are almost jammed and the vehicle just stay right there, that isn't much real. With this same problem, when the wheel are little, when in the air, they accelerate like if they where at the ground (with force that retains them to roll a little). When they are bigger, when in the air, they accellerate really faster (no ground force) and it's really natural. It's like if something is cancelled when the wheel are little BUT is there when they are big. Hope you understand what I'm saying as it is my bro who is the expert with vehicles :) (not programming, just physic )

3 - We have problem when in reverse. When accelarating in forward, the front of the vehicles goes up and this is also a real feel. But in reverse, it does the same (front goes up). It should normally goes down. What it does is that it makes the front wheels goes up, and going backward is a nightmare as the wheel dont touch the ground.

That is the probs we have as of now :) But your physic is really good and we like it really much.

Thanks for any help with this.
#7
01/20/2003 (8:14 am)
well ... :)

1 - You have to include the hub animation within the col-1

2 - Still no clues. Any hints with this will be greatly appreciated.

3 - That was me. I had my front wheels upier then my back wheels. When equal, the physic is #1.

Thanks !

[edit]
Would it be difficult to had to the engine that we could set the mass for the wheels in script (cs) ? I think that, if I understand well, that the mass is set by half of the bounding box of the wheel. So, when the wheel is small, I think the mass is set really not heavy. That could be my #2 solution ?!? Not sure, tough :)
[/edit]
#8
11/15/2006 (3:37 am)
If the engine is built in "debug" mode, collisions cause freezing. check that the engine is built in "release" mode
#9
06/11/2007 (10:31 pm)
If anyone is interested I've posted up some fixes we wrote for vehicle collision here at Sickhead Games.
www.garagegames.com/mg/forums/result.thread.php?qt=63305