Flying vehicle tips
by Richard Jones · in Torque Game Engine · 03/06/2002 (5:57 pm) · 9 replies
Has anyone got any good datablock values for flying vehicles? I have BadGuys drone vehicle, but this seems very difficult to control as it moves very slowly. I'm not sure whether its supposed move like this or whether I've implemented it incorrectly somehow.
I have customised the default wheeled vehicle values to suit my needs OK, but I'm having problems doing this for flying vehicles.
If someone could give me tips on making a flying craft faster and more nimble, that would be great. The modifications I have made have made it faster, but the craft tends not to travel the way it is facing (it sort of slides through the air).
Thanks in advance. :)
I have customised the default wheeled vehicle values to suit my needs OK, but I'm having problems doing this for flying vehicles.
If someone could give me tips on making a flying craft faster and more nimble, that would be great. The modifications I have made have made it faster, but the craft tends not to travel the way it is facing (it sort of slides through the air).
Thanks in advance. :)
About the author
#2
03/07/2002 (3:36 am)
If you could post them here at your convenience that would be really appreciated, thanks :)
#3
datablock FlyingVehicleData(InterceptFlyer)
{
spawnOffset = "0 0 2";
catagory = "Vehicles";
shapeFile = "~/data/shapes/player/ulysses.dts";
multipassenger = false;
computeCRC = true;
debrisShapeName = "~/data/shapes/player/ulysses.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.15;
density = 1.0;
mountPose[0] = sitting;
numMountPoints = 3;
isProtectedMountPoint[0] = true;
cameraMaxDist = 15;
cameraOffset = 2.5;
cameraLag = 0.9;
explosion = ScoutFlyerExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxDamage = 20.00;
destroyedLevel = 20.00;
isShielded = true;
energyPerDamagePoint = 160;
maxEnergy = 280; // Afterburner and any energy weapon pool
minDrag = 85; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 10; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
rechargeRate = 0.0;
maxAutoSpeed = 15; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 15; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 15; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.95; // Dampen control input so you don't' whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 10; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 100; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 3000; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 500; // Steering jets (force applied when you move the mouse)
steeringRollForce = 8; // Steering jets (how much you heel over when you turn)
rollForce = 100; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 5; // Height off the ground at rest
createHoverHeight = 3; // Height off the ground when created
//maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
//horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
//verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
//maneuveringForce = 2500; // Horizontal jets (W,S,D,A key thrust)
//steeringForce = 1200; // Steering jets (force applied when you move the mouse)
//steeringRollForce = 400; // Steering jets (how much you heel over when you turn)
//rollForce = 4; // Auto-roll (self-correction to right you after you roll/invert)
//hoverHeight = 5; // Height off the ground at rest
//createHoverHeight = 3; // Height off the ground when created
// Rigid body
mass = 100; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
minImpactSpeed = 1; // If hit ground at speed above this then it's an impact. Meters/second
softImpactSpeed = 10; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
speedDamageScale = 0.04;
collDamageThresholdVel = 20.0;
collDamageMultiplier = 0.02;
//
minTrailSpeed = 15; // The speed your contrail shows up at.
trailEmitter = ScoutFlyerContrailEmitter;
forwardJetEmitter = ScoutFlyerEmitter;
downJetEmitter = ScoutFlyerEmitter;
//
jetSound = ScoutFlyerThrustSound;
engineSound = ScoutFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 15.0;
mediumSplashSoundVelocity = 30.0;
hardSplashSoundVelocity = 60.0;
exitSplashSoundVelocity = 20.0;
exitingWater = VehicleExitWaterMediumSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeMediumSplashSound;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 1.0;
damageEmitter[0] = ScoutFlyerEmitter;
damageEmitter[1] = ScoutFlyerEmitter;
damageEmitter[2] = ScoutFlyerEmitter;
damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 3;
//
max[chaingunAmmo] = 1000;
minMountDist = 4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
checkRadius = 5.5;
observeParameters = "1 10 10";
};
But, IRC is a good place to hang out :)
03/07/2002 (10:32 am)
Try this:datablock FlyingVehicleData(InterceptFlyer)
{
spawnOffset = "0 0 2";
catagory = "Vehicles";
shapeFile = "~/data/shapes/player/ulysses.dts";
multipassenger = false;
computeCRC = true;
debrisShapeName = "~/data/shapes/player/ulysses.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.15;
density = 1.0;
mountPose[0] = sitting;
numMountPoints = 3;
isProtectedMountPoint[0] = true;
cameraMaxDist = 15;
cameraOffset = 2.5;
cameraLag = 0.9;
explosion = ScoutFlyerExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxDamage = 20.00;
destroyedLevel = 20.00;
isShielded = true;
energyPerDamagePoint = 160;
maxEnergy = 280; // Afterburner and any energy weapon pool
minDrag = 85; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 10; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
rechargeRate = 0.0;
maxAutoSpeed = 15; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 15; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 15; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.95; // Dampen control input so you don't' whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 10; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 100; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 3000; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 500; // Steering jets (force applied when you move the mouse)
steeringRollForce = 8; // Steering jets (how much you heel over when you turn)
rollForce = 100; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 5; // Height off the ground at rest
createHoverHeight = 3; // Height off the ground when created
//maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
//horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
//verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
//maneuveringForce = 2500; // Horizontal jets (W,S,D,A key thrust)
//steeringForce = 1200; // Steering jets (force applied when you move the mouse)
//steeringRollForce = 400; // Steering jets (how much you heel over when you turn)
//rollForce = 4; // Auto-roll (self-correction to right you after you roll/invert)
//hoverHeight = 5; // Height off the ground at rest
//createHoverHeight = 3; // Height off the ground when created
// Rigid body
mass = 100; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
minImpactSpeed = 1; // If hit ground at speed above this then it's an impact. Meters/second
softImpactSpeed = 10; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
speedDamageScale = 0.04;
collDamageThresholdVel = 20.0;
collDamageMultiplier = 0.02;
//
minTrailSpeed = 15; // The speed your contrail shows up at.
trailEmitter = ScoutFlyerContrailEmitter;
forwardJetEmitter = ScoutFlyerEmitter;
downJetEmitter = ScoutFlyerEmitter;
//
jetSound = ScoutFlyerThrustSound;
engineSound = ScoutFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 15.0;
mediumSplashSoundVelocity = 30.0;
hardSplashSoundVelocity = 60.0;
exitSplashSoundVelocity = 20.0;
exitingWater = VehicleExitWaterMediumSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeMediumSplashSound;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 1.0;
damageEmitter[0] = ScoutFlyerEmitter;
damageEmitter[1] = ScoutFlyerEmitter;
damageEmitter[2] = ScoutFlyerEmitter;
damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 3;
//
max[chaingunAmmo] = 1000;
minMountDist = 4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
checkRadius = 5.5;
observeParameters = "1 10 10";
};
But, IRC is a good place to hang out :)
#4
Unfortunately, this hasn't really changed anything for me. The craft still moves *extreemly* slowly and when I move the mouse the craft hardly turns at all.
I've obviously got another problem somewhere that's causing this, but I don't know what.
Did you get the particle systems to work with the craft?
03/08/2002 (5:22 am)
Thanks for the data.Unfortunately, this hasn't really changed anything for me. The craft still moves *extreemly* slowly and when I move the mouse the craft hardly turns at all.
I've obviously got another problem somewhere that's causing this, but I don't know what.
Did you get the particle systems to work with the craft?
#5
Hmm, well, see maneuvering force? Make that like 10000, see if it moves.
Otherwise, click on the "Chat" link over there on the right and come talk to me :)
03/08/2002 (6:10 am)
Make sure you delete the dso's. Also, WHAT head version are you using? I'm on the VERY latest, physics have changed a couple times in the last 3 weeks. If you haven't updated, update :)Hmm, well, see maneuvering force? Make that like 10000, see if it moves.
Otherwise, click on the "Chat" link over there on the right and come talk to me :)
#6
Thanks again.
03/08/2002 (8:46 am)
I've downloaded the latest Head release and after solving the inevitable merging issues it flys great! As you said, the physics have obviously changed a lot over the last week, but its so much better now. :)Thanks again.
#8
04/17/2002 (10:47 pm)
Just in case anyone else bases their flying vehicle script on the above post, change "CATAGORY" to "CATEGORY". Might save you a few hours =)
#9
That explains a few things.
I'm gonna go sit in the corner and giggle...
04/18/2002 (6:48 am)
DOH, I never noticed that before.That explains a few things.
I'm gonna go sit in the corner and giggle...
Torque Owner Edward Gardner
I have reasonable moving vehicles, catch me on IRC and I will DCC some files to you, or post them here when I remembeand am at my dev PC :)