Game Development Community

Getting PhysicalZones to work on Vehicles

by Anton Bursch · in Torque Game Engine · 12/01/2005 (1:41 pm) · 2 replies

Has anybody gotten PhysicalZones to work on vehicles? I bumped into them last night playing with TGE 1.4. I set a PhysicalZone so that my player was drawn across the terrain as though gravity was coming sideways. It would be perfect for my innertubing game so I could use the terrain as a downhill mountain side but as is the PhysicalZones don't affect vehicles. Anyone know how to make them?

#1
06/23/2009 (3:53 pm)
I am interested in the answer to this question also.
#2
06/24/2009 (10:33 am)
I am shooting from the hip here so forgive me if its wrong.

I think all you have to do is find in wheeledVehicle.cc
// Gravity  
  mRigid.force += Point3F(0, 0, sWheeledVehicleGravity * mRigid.mass);

and change it to
mRigid.force += Point3F(0, 0, sWheeledVehicleGravity *mGravityMod* mRigid.mass);  
mRigid.force += mAppliedForce * mRigid.mass;

And add PhysicalZoneObjectType to the wheeled vehicle's sClientCollisionMask.

I got most of the answer from Phisical zone and vehicle
Not 100% on that last part but you should get the idea.