Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Physics Model

The AircraftPhys physics model is built on top of the VehiclePhys base model. It is split into three parts: AircraftPhys 3211498AircraftPhys 3211498 and AircraftPhys 3211498.

...

General Aircraft Physics
Anchor
General Aircraft Physics
General Aircraft Physics

The translational physics of a CTOL (Conventional Take-Off and Landing) aircraft are based on four primary forces affecting the vehicle:

...

ParameterDefaultShort Description
MaxEngineThrust0.0Maximum thrust produced by the engine
MaxReverseThrust0.0Maximum reverse thrust, used for reversing on the runway (not realistic, but necessary)
ThrustGain0.0Sets the throttle response speed, i.e how quickly we can throttle from 0 to 100% and back
MaxCruisingSpeed0.0Sets an upper limit on the maximum speed of the aircraft
ElevatorGain0.0Sets the rotation intensity for pitch

ElevatorDamping

0.0Sets rotation damping for pitch, limits maximum pitching speed
AileronGain0.0Sets the rotation intensity for roll
AileronDamping0.0Sets the rotation damping for roll, limits maximum rolling speed
RudderGain0.0Sets the rotation intensity for yaw
RudderDamping0.0Sets the rotation damping for yaw, limits maximum yaw speed
LiftCoeff0.0Lift coefficient, higher value means aircraft can achieve the same lift at a lower speed (i.e stay in the air while moving slower)
BrakingAction0.0Sets the strength of the brakes, helps stop faster on the runway
LandingGearMaxSpeed0.0Sets the maximum speed at which the aircraft can move when the landing gear is deployed
DihedralWingsfalseIf set to "true", aircraft's wings are assumed to be dihedral, which means they automatically try to level out the plane if its wings are not parallel with the ground
RStabilization0.0Sets the intensity of roll stabilization (see: DihedralWings)
MaxSteeringAngle30.0Sets the maximum angle that the aircraft's flaps can be rotated to (should be kept between 0 and 45 degrees)
MaxEngineRotation25.0Sets maximum engine rotation (for visual effects only)
RotorSpeed360.0Sets maximum rotor speed (for visual effects only)
RotorAcceleration180.0Sets rotor acceleration (for visual effects only)
RotorDeceleration180.0Sets rotor deceleration (for visual effects only)

Mouse Steering
Anchor
Mouse Steering
Mouse Steering

The mouse steering works by trying to steer the aircraft towards a point in space defined by where your camera is looking (see AircraftPhys 3211498 below).
It is implemented using a AircraftPhys 3211498. The input to the steering system is the position of the target point

...

ParameterDefaultShort Description

Direct Response
(Proportional Gain)

(2.0, 2.0, 2.0)Governs how much the plane directly responds to a discrepancy between the mouse steering target and the plane's orientation.
Response Over Time
(Integral Gain)
(0.2, 2.0, 0.2)
Anti-Wobble Response
(Derivative Gain)
(0.4, 1.0, 0.4)
Max. Accumulated Response Over Time
(Integral Limit)
(0.1, 0.5, 0.1)
Aggressive Turn Angle45°
Target Point Distance150m

Target Point Distance
Anchor
Target Point Distance
Target Point Distance

The point in space your aircraft is steering towards is defined at a fixed distance in front of the camera (TargetPointDistance). This means that in order to fly straight ahead you need to point your camera slightly downwards (exaggerated here).

...

It is suggested to set TargetPointDistance to a rough estimate of the distance at which most aiming will take place, e.g. the weapon's range plus the camera distance.
This is much less of an issue for tracking weapons and the distance should not be set too short, otherwise the player will have to aim the camera further down to keep the plane flying straight ahead, which starts to feel weird at some point.
The camera profile should also not contain extreme values for camera height or distance in order to minimize the angle between the camera-to-target and aircraft-to-target vectors.

PID Controller
Anchor
PID Controller
PID Controller

... describe what the properties of the 3 terms are and how to tune the parameters

Flight Ceiling Behavior
Anchor
Flight Ceiling Behavior
Flight Ceiling Behavior

The CTOL Flight Ceiling altitude is configured in the Level Settings. This part of the aircraft physics model can attach some additional behavior to each aircraft type while above the flight ceiling.

...