CMCharacter Modules 0.1.0

Heading Air

Kind: State, air movement role · Add Component: Character Modules > States > Heading Air

Keeps the jump on its course, with only a little drift. Each jump is a commitment the player must judge.

Moving in the air the classic way: the body keeps facing where it jumped, and the stick only drifts it a little. A jump is a commitment, which makes judging it part of the challenge.

Inspector
▼Heading Air⋮
CharacterCharacter (Character Motor)
Gravity20
Terminal Speed0
Max Forward Speed10.8
Forward Acceleration15.2
Drag3.5
Overspeed Deceleration10.1
Side Speed3.4
Max Back Speed5.4
Back Recovery20.25
Creep Above Max SpeedOff ▾
The Heading Air component in the Inspector, with its defaults.
Origin. Super Mario 64 (1996): Mario cannot turn in the air.

How it works

The Falling mode: runs when nothing else runs.

Heading Air: in the air the way classic 3D platformers do it. The body never turns: a jump commits to its take-off heading. The stick along the facing speeds up or slows down the forward speed; the stick across it gives a sideways drift that stops the moment the stick is let go. Forward speed drifts down slowly on its own, and pushing past top speed is held back.

Velocity it did not make itself (a jump pad's push, a platform's momentum) is kept. Whatever launches the character turns its body if it wants to (Jump Pad's Turn Body, the Ladder pushing off). The motor's Body Facing must be States.

Numbers from the classic 3D platformer study (D33).

Combine it

  • Priority 0: when several states could run, the highest priority wins (see How modules combine).
  • Body facing: works with characters whose body faces States.
  • Used by the presets: Retro Platformer.

Properties

PropertyDescriptionRangeDefault
CharacterThe character this module belongs to. Drag its Character Motor here.None
GravityDownward acceleration, m/s² (classic arena shooters: 25 at 32 map units per metre).0 or more20
Terminal SpeedFastest fall, m/s. 0: no limit.0 or more0
Max Forward SpeedForward speed above which pushing on is held back, m/s.0 or more10.8
Forward AccelerationSpeed-up from a full stick along the facing, m/s².0 or more15.2
DragForward speed always drifts toward zero by this much, m/s².0 or more3.5
Overspeed DecelerationExtra slowing above Max Speed, m/s².0 or more10.1
Side SpeedSideways drift from a full stick across the facing, m/s. It does not build up.0 or more3.4
Max Back SpeedFastest backwards speed before it is pushed back, m/s.0 or more5.4
Back RecoveryPush back toward Max Back Speed when moving backwards faster, m/s².0 or more20.25
Creep Above Max SpeedLet a held stick keep gaining a little speed above Max Speed, as the original does. Off: hold at Max Speed.Off

Additional resources