>>58722237>>58722156Oh shit, there's a maths appendix.

Pitching while gliding

With level gliding, or pitching straight up or down, the acceleration

in the direction of travel is easy. It’s when the angle is oblique that the motion is

awkward and getting the final result involves six formulas, five used!

Used: while any character glides.

If pitching up (errors if pitching down):

Accel = (((1-sin(PitchAngle))-1)*-1)^0.654317989965143*-20;

If pitching down (errors if pitching up):

Accel = (sin(PitchAngle)*-1)^0.654317989965143*20;

In both cases (to include the effects of banking):

Accel *= abs(cos(BankAngle));

For the vertical descent rate (two feet per second when level):

VertDescent = (15/11) * cos(PitchAngle) +

(sin(PitchAngle)*cos(PitchAngle)*BaseSpeed);

For the vertical speed (the speed going up and down):

VertSpeed = sin(PitchAngle)*BaseSpeed - (cos(PitchAngle)*VertDescent);

For the horizontal speed (the speed horizontally (over the map)):

HorizSpeed = sqrt(BaseSpeed^2-VertSpeed^2);

Notes: I had to spend two hours fiddling with numbers in a spreadsheet to get

this formula. One of the first two formulas must be used, based on when they are

used. The “0.654318” number is the value at which, at maximum speed, one

glides perfectly level, which occurs at an angle near 6.827994177089°. Also note

that gliding cannot occur below 2 feet per second. Use a sine and cosine function

on the horizontal speed to get the Z and X speeds (respectively – 0° is due north

like on a compass).