Flying vehicle ground collsion crashes engine
by Andy Hawkins · in Torque Game Engine · 04/25/2008 (5:40 am) · 1 replies
I would like to get the staff to resolve this if possible, as it seems this has never been fixed. In a flying vehicle if you hit the ground really hard the engine freezes and then crashes.
As I'm releasing BRAVE in a few days I can't have this happen. How can this be fixed or worked around please?
As I'm releasing BRAVE in a few days I can't have this happen. How can this be fixed or worked around please?
Torque Owner Alex Stone
-----FIX-----
In vehicle.cc, after
bool Vehicle::resolveCollision(Rigid& ns,CollisionList& cList) { // Apply impulses to resolve collision bool colliding, collided = false;insert
After
// Apply impulses to the rigid body to keep it from // penetrating the surface. ns.resolveCollision(cList.collision[i].point, cList.collision[i].normal); colliding = collided = true;Insert
Replace
with
NOTE: you can increase or decrease the max collision count to suit your needs. You may even want to make it a field in VehicleData if you need this for different objects. Obviously this is a hack, but after I implemented it all the nasty crashes and freeze I had with vehicle collision went away. There may be other similar implementations of this fix in the forums and I know the Sickhead Games guys have done some work on collision response as well (there is a nice long post somewhere in this Forum with all their code).
I hope that works for you!