Torque Game Engine DocumentationVersion 1.3.x |
HoverVehicleData also derives from VehicleData and aids the creation of hover-vehicle objects. HoverVehicleData defines a few fields beyond those described in VehicleData. These new fields are listed in the table below.
Table D.8. HoverVehicleData Member Fields
| Field Name | Type | Default Value | Description |
|---|---|---|---|
| Special Effects Data | |||
| jetSound | AudioProfilePtr | NULL | Points to the AudioProfile used to produce sounds for the jet. If specified, must point to an object of type AudioProfile. Must adhere to the semantics associated with AudioProfile*, as defined in the Torque Game Engine. |
| engineSound | AudioProfilePtr | NULL | Points to the AudioProfile used to produce sounds for the engine. If specified, must point to an object of type AudioProfile. Must adhere to the semantics associated with AudioProfile*, as defined in the Torque Game Engine. |
| floatSound | AudioProfilePtr | NULL | Points to the AudioProfile used when the to indicate that the vehicle is floating. If specified, must point to an object of type AudioProfile. Must adhere to the semantics associated with AudioProfile*, as defined in the Torque Game Engine. |
| dustTrailEmitter | ParticleEmitterDataPtr | NULL | Points to the ParticleEmitterData datablock used in the generation of the vehicle's dust trail. If specified, must point to an object of type AudioProfile. Must adhere to the semantics associated with AudioProfile*, as defined in the Torque Game Engine. |
| dustTrailOffset | Point3F | (0.0, 0.0, 0.0) | The offset at which to generate dust particles from the point of contact between the vehicle and the terrain when the vehicle is in motion. |
| dustTrailFreqMod | Float | 15.0 | The frequency modulation used to emit dust. |
| triggerTrailHeight | Float | 2.5 | Maximum height the vehicle may be off the ground in order to begin generating a dust trail. |
| Physics Data | |||
| dragForce | Float | 0.0 | Used to simulate the constant drag acting on the vehicle. Also used to determine the vehicle's maxThrustSpeed, ((mainThrustForce + StrafeThrustForce) / dragForce)Note: The dragForce must be at least 0.01. If it is a console error will be produced, and the engine will force the dragForce to 0.01. |
| vertFactor | Float | 0.25 | The scalar applied to the vertical portion of the velocity drag acting on a vehicle. This scalar factor is applied to vehicle's velocity whether or not it is floating. For the x- and y-components of velocity drag, a factor of 0.25 is applied when the vehicle is floating, and no factor is applied to the x- and y-components when the vehicle is not floating. This velocity drag is multiplied by the vehicle's dragForce, as defined above, and the result is subtracted from it's movement force. Note: The vertFactor must be between 0.0 and 1.0 (inclusive). If it is not, a console error will be generated, and the field's value will be clamped. |
| floatingThrustFactor | Float | 0.15 | The scalar factor applied to the vehicle's thrust force when the vehicle is floating. Note: The floatingThrustFactor must be between 0.0 and 1.0 (inclusive). If it is not, a console error will be produced, and the value will be clamped. |
| mainThrustForce | Float | 0.0 | The force generated by thrusting the vehicle forward. Also used to determine the maximum volume of the engine sound (the vehicle's actual thrusting power is divided by mainThrustForce + strafeThrustForce in the determination of what percentage volume the engine sound should be played at). Also used to determine the vehicle's maxThrustSpeed, ((mainThrustForce + StrafeThrustForce) / dragForce)Note: The dragForce must be at least 0.01. If it is a console error will be produced, and the engine will force the dragForce to 0.01. |
| reverseThrustForce | Float | 0.0 | The force generated by thrusting the vehicle backward. |
| strafeThrustForce | Float | 0.0 | The force generated by thrusting the vehicle to a side. Also used to determine the maximum volume of the engine sound (the vehicle's actual thrusting power is divided by mainThrustForce + strafeThrustForce in the determination of what percentage volume the engine sound should be played at). Also used to determine the vehicle's maxThrustSpeed, ((mainThrustForce + StrafeThrustForce) / dragForce)Note: The dragForce must be at least 0.01. If it is a console error will be produced, and the engine will force the dragForce to 0.01. |
| turboFactor | Float | 1.0 | The factor by which the vehicle's thrust force is scaled when jetting. |
| normalForce | Float | 30.0 | |
| floatingGravMag | Float | 1.0 | The factor by which the gravitational force affecting the vehicle is scaled when the vehicle is floating. |
| brakingForce | Float | 1.0 | The force generated by braking (vehicle is considered to be braking if the throttle is off, and no left or right thrust is being applied, but the vehicle is moving). brakingForce is applied only when the vehicle's velocity is less than brakingActivationSpeed, defined below. |
| brakingActivationSpeed | Float | 0.0 | The maximum speed at which the vehicle may be travelling in order for brakingForce to be applied. |
| gyroDrag | Float | 10.0 | The gyscropic drag which is scaled against the vehicle's angular momentem to dampen its rigid body torque. |
| restorativeForce | Float | 10.0 | |
| steeringForce | Float | 25.0 | The force applied to steering (rotation about the z-axis) maneuvers along the x-axis; affects the vehicle's rigid body torque. |
| rollForce | Float | 2.5 | The rolling (rotation about the y-axis) force applied when steering in the x-direction. |
| pitchForce | Float | 2.5 | The pitching (rotation about the x-axis) force applied to steering maneuvers along the y-axis. |
| stabLenMin | Float | 0.5 | |
| stabLenMax | Float | 2.0 | |
| stabSpringConstant | Float | 30.0 | The value used to generate spring force, by scaling against stabilizer compression. |
| stabDampingConstant | Float | 10.0 | The scalar used to determine dampening force acting against the vehicles spring force. |
HoverVehicleData provides many new fields, and the opportunity for complex physical simulation. In the next section, we examine WheeledVehicleData.