Hover Vehicles
by Daniel Neilsen · in Torque Game Engine · 03/12/2002 (5:19 pm) · 10 replies
Hey guys,
I am just starting to play with the hover vehicles and was wondering a few of things that some of you guys that have played with hover vehicles might be able to answer.
1) Could someone out there post a hover vehicle datablock that works for TGE (to save me time more than anything)
2) Would it be possible to make a hover vehicle recoil in a pinball style fashion. Ie. no collission damage, and no slowdown from the collission?? (Without editing the engine)
3) Would it be possible to make a hover vehicle act like it were in space. ie. You thrust in one diretcion and you will continue going in that direction until you thrust in another direction, irrespective of if you turn the vehicle or not? (Without editing the engine)
Thanks guys
I am just starting to play with the hover vehicles and was wondering a few of things that some of you guys that have played with hover vehicles might be able to answer.
1) Could someone out there post a hover vehicle datablock that works for TGE (to save me time more than anything)
2) Would it be possible to make a hover vehicle recoil in a pinball style fashion. Ie. no collission damage, and no slowdown from the collission?? (Without editing the engine)
3) Would it be possible to make a hover vehicle act like it were in space. ie. You thrust in one diretcion and you will continue going in that direction until you thrust in another direction, irrespective of if you turn the vehicle or not? (Without editing the engine)
Thanks guys
About the author
#2
gravity is increased by increasing the value of
floatingGravMag
I found approx 200 to be a good number
Any idea on the previous quesitons guys?
03/13/2002 (4:03 am)
okgravity is increased by increasing the value of
floatingGravMag
I found approx 200 to be a good number
Any idea on the previous quesitons guys?
#3
I fought for this for about 3 days, then gave up, then fought for it for another couple days:
Here's a working one (assuming you have the latest head build):
datablock HoverVehicleData(AssaultTank)
{
spawnOffset = "0 0 1";
floatingGravMag = 50.5;
catagory = "Vehicles";
shapeFile = "~/data/shapes/player/gravtank.dts";
computeCRC = true;
debrisShapeName = "~/data/shapes/player/GRAVTANK.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.0;
density = 0.3;
mountPose[0] = scoutRoot;
cameraMaxDist = 15.0;
cameraOffset = 5.7;
cameraLag = 5.5;
numMountPoints = 3;
isProtectedMountPoint[0] = true;
explosion = AssaultTankExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
lightOnly = 1;
maxDamage = 120;
destroyedLevel = 120;
isShielded = true;
rechargeRate = 0.7;
energyPerDamagePoint = 75;
maxEnergy = 150;
minJetEnergy = 15;
jetEnergyDrain = 1.3;
// Rigid Body
mass = 5;
bodyFriction = 0;
bodyRestitution = 0.5;
softImpactSpeed = 20; // Play SoftImpact Sound
hardImpactSpeed = 28; // Play HardImpact Sound
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 29;
speedDamageScale = 0.010;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23;
collDamageMultiplier = 0.030;
dragForce = 1.9;
// dragForce = 25 / 45.0;
vertFactor = 0.5;
floatingThrustFactor = 0.35;
mainThrustForce = 100;
reverseThrustForce = 70;
strafeThrustForce = 70;
turboFactor = 1.5;
brakingForce = 30;
brakingActivationSpeed = 30;
stabLenMin = 6.50;
stabLenMax = 7.25;
stabSpringConstant = 20;
stabDampingConstant = 20;
gyroDrag = 36; // 16
// gyroForce = 50
normalForce = 10;
restorativeForce = 100;
steeringForce = 90;
rollForce = 7;
pitchForce = 10;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 2.5;
dustHeight = 1.0;
dustTrailEmitter = TireEmitter;
dustTrailOffset = "0.0 -1.0 0.5";
triggerTrailHeight = 3.6;
dustTrailFreqMod = 15.0;
jetSound = ScoutSqueelSound;
engineSound = ScoutEngineSound;
floatSound = ScoutThrustSound;
softImpactSound = GravSoftImpactSound;
hardImpactSound = HardImpactSound;
wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 10.0;
mediumSplashSoundVelocity = 20.0;
hardSplashSoundVelocity = 30.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterSoftSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterSoftSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeSoftSplashSound;
minMountDist = 4;
damageEmitter[0] = AssaultTankEmitter;
damageEmitter[1] = AssaultTankEmitter;
damageEmitter[2] = AssaultTankEmitter;
damageEmitterOffset[0] = "0.0 -1.5 0.5 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
max[chaingunAmmo] = 1000;
forwardJetEmitter = ContrailEmitter;//WildcatJetEmitter;
//cmdCategory = Tactical;
//cmdIcon = CMDHoverScoutIcon;
//cmdMiniIconName = "commander/MiniIcons/com_landscout_grey";
//targetNameTag = 'WildCat';
//targetTypeTag = 'Grav Cycle';
//sensorData = VehiclePulseSensor;
checkRadius = 1.7785;
observeParameters = "1 10 10";
//runningLight[0] = WildcatLight1;
//runningLight[1] = WildcatLight2;
//runningLight[2] = WildcatLight3;
shieldEffectScale = "0.9375 1.125 0.6";
};
03/13/2002 (4:57 am)
Sorry, have been busy.I fought for this for about 3 days, then gave up, then fought for it for another couple days:
Here's a working one (assuming you have the latest head build):
datablock HoverVehicleData(AssaultTank)
{
spawnOffset = "0 0 1";
floatingGravMag = 50.5;
catagory = "Vehicles";
shapeFile = "~/data/shapes/player/gravtank.dts";
computeCRC = true;
debrisShapeName = "~/data/shapes/player/GRAVTANK.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.0;
density = 0.3;
mountPose[0] = scoutRoot;
cameraMaxDist = 15.0;
cameraOffset = 5.7;
cameraLag = 5.5;
numMountPoints = 3;
isProtectedMountPoint[0] = true;
explosion = AssaultTankExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
lightOnly = 1;
maxDamage = 120;
destroyedLevel = 120;
isShielded = true;
rechargeRate = 0.7;
energyPerDamagePoint = 75;
maxEnergy = 150;
minJetEnergy = 15;
jetEnergyDrain = 1.3;
// Rigid Body
mass = 5;
bodyFriction = 0;
bodyRestitution = 0.5;
softImpactSpeed = 20; // Play SoftImpact Sound
hardImpactSpeed = 28; // Play HardImpact Sound
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 29;
speedDamageScale = 0.010;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23;
collDamageMultiplier = 0.030;
dragForce = 1.9;
// dragForce = 25 / 45.0;
vertFactor = 0.5;
floatingThrustFactor = 0.35;
mainThrustForce = 100;
reverseThrustForce = 70;
strafeThrustForce = 70;
turboFactor = 1.5;
brakingForce = 30;
brakingActivationSpeed = 30;
stabLenMin = 6.50;
stabLenMax = 7.25;
stabSpringConstant = 20;
stabDampingConstant = 20;
gyroDrag = 36; // 16
// gyroForce = 50
normalForce = 10;
restorativeForce = 100;
steeringForce = 90;
rollForce = 7;
pitchForce = 10;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 2.5;
dustHeight = 1.0;
dustTrailEmitter = TireEmitter;
dustTrailOffset = "0.0 -1.0 0.5";
triggerTrailHeight = 3.6;
dustTrailFreqMod = 15.0;
jetSound = ScoutSqueelSound;
engineSound = ScoutEngineSound;
floatSound = ScoutThrustSound;
softImpactSound = GravSoftImpactSound;
hardImpactSound = HardImpactSound;
wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 10.0;
mediumSplashSoundVelocity = 20.0;
hardSplashSoundVelocity = 30.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterSoftSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterSoftSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeSoftSplashSound;
minMountDist = 4;
damageEmitter[0] = AssaultTankEmitter;
damageEmitter[1] = AssaultTankEmitter;
damageEmitter[2] = AssaultTankEmitter;
damageEmitterOffset[0] = "0.0 -1.5 0.5 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
max[chaingunAmmo] = 1000;
forwardJetEmitter = ContrailEmitter;//WildcatJetEmitter;
//cmdCategory = Tactical;
//cmdIcon = CMDHoverScoutIcon;
//cmdMiniIconName = "commander/MiniIcons/com_landscout_grey";
//targetNameTag = 'WildCat';
//targetTypeTag = 'Grav Cycle';
//sensorData = VehiclePulseSensor;
checkRadius = 1.7785;
observeParameters = "1 10 10";
//runningLight[0] = WildcatLight1;
//runningLight[1] = WildcatLight2;
//runningLight[2] = WildcatLight3;
shieldEffectScale = "0.9375 1.125 0.6";
};
#4
That is obviously a datablock ripped form T2 though and, a good portion of that properties there are T2 specific.
But it does help :)
Can anyone describe what each of the properties in relation to vehicle movement and response do?
03/13/2002 (4:16 pm)
Thanks for that edward.That is obviously a datablock ripped form T2 though and, a good portion of that properties there are T2 specific.
But it does help :)
Can anyone describe what each of the properties in relation to vehicle movement and response do?
#5
03/13/2002 (5:14 pm)
I took the T2 tank datablock and put it into the original release of Torque and it worked fine for me!
#6
BUT
a lot of the stuff in that datablock only relates to T2 script.
eg.
mountpose[0] nothing to do with torque
What I want to know is what each of the torque properties do in relation to vehicle movement and control.
eg. What does each of the gyro properties do??
Does anyone know?
03/13/2002 (5:18 pm)
It would work fine yes.BUT
a lot of the stuff in that datablock only relates to T2 script.
eg.
mountpose[0] nothing to do with torque
What I want to know is what each of the torque properties do in relation to vehicle movement and control.
eg. What does each of the gyro properties do??
Does anyone know?
#7
as you can see the mountpose is in full use in the script
the gyro fields declared for WheeledVehicle are not used
gyroForce and gyroDamping
..
and are not available at all to the hovervehicle
03/14/2002 (4:11 am)
%obj.setActionThread(%vehicle.getDatablock().mountPose[%node],true,true);as you can see the mountpose is in full use in the script
the gyro fields declared for WheeledVehicle are not used
gyroForce and gyroDamping
..
and are not available at all to the hovervehicle
#8
Are Hover vehicles Flying vehicles with properties set to make them hover, or are they a completely different class (like wheeled vehicles)?
03/14/2002 (7:58 am)
Hi,Are Hover vehicles Flying vehicles with properties set to make them hover, or are they a completely different class (like wheeled vehicles)?
#9
And the T2 scripts WILL work fine in Dev_Stable and version 1.1.
It's all the updated physics in the HEAD build that means you have to mess with force values.
The above isn't perfect, but it works as a starting point. I figured out alof of stuff via trial and error, and my "Physics for Game Developers" book sitting next to me.
Interesting that the gyro stuff isn't used, I thought that I had seen an effect of that variable, must have changed something else...
03/14/2002 (10:59 am)
Yeah, you caught me, I used the T2 scripts as a startting point and have been deleting stuff as I fnd it's not used ;)And the T2 scripts WILL work fine in Dev_Stable and version 1.1.
It's all the updated physics in the HEAD build that means you have to mess with force values.
The above isn't perfect, but it works as a starting point. I figured out alof of stuff via trial and error, and my "Physics for Game Developers" book sitting next to me.
Interesting that the gyro stuff isn't used, I thought that I had seen an effect of that variable, must have changed something else...
#10
also sorry for the necro of a old thread
Thank you
Vincent
03/27/2011 (7:52 pm)
Any one know if this code will work for Torque 3D?also sorry for the necro of a old thread
Thank you
Vincent
Torque Owner Daniel Neilsen
Still having trouble with this. Does anyone know what property effects the gravity effects on the hover vehicle?
My vehicle is literally takign off with no gravity effects whatsoever :/