Game Development Community

Vehicle passing through terrain when shot

by Jules · in Torque Game Engine · 07/21/2007 (2:36 am) · 3 replies

Hi...

I'm having a bit of a problem in my game with a vehicle. After shooting it with a laser gun several times with some force, it can sometimes pass through the terrain.

Any suggestions on a fix?

Thanks

Jules.

#1
07/21/2007 (4:09 am)
Eventually figured it out :)

Note to self: must remember to spend more time looking into a solution before posting!
#2
07/21/2007 (8:28 am)
Want to post for the record how you fixed that?
#3
07/21/2007 (9:02 am)
Hi ... yes....

Adding and Increasing the following values to my flying vehicle prevented it from being shot at multiple times and going under the terrain.

collisionTol
contactTol

It was a quick fix for now, but prevents the flying vehicle from resting on the terrain, with a few tweaks here and there I'm sure it will be a case of writing a piece of script that when the vehicle is hit increase the collisionTol and contactTol so that it does not go under, then reduce this number so that the vehicle can drop slowly down after correcting itself with autoAngularForce.