CMCharacter Modules 0.1.0

Lunge

Kind: State · Add Component: Character Modules > States > Lunge

Dives forward out of a ground pound. It reaches gaps a jump alone cannot.

A dive forward out of a ground pound: a fixed-speed lunge with a small hop, to cover a gap the jump alone would not.

Inspector
▼Lunge⋮
CharacterCharacter (Character Motor)
Up Speed19.8
Gravity Scale1.333
Speed15.2
Brake22.8
Minimum Speed1.9
Steer Acceleration5.7
Steer Speed3.8
Bonk Speed2
Slide Deceleration20
Slide Time0.5
The Lunge component in the Inspector, with its defaults.
Origin. Super Mario Odyssey (2017): the dive.

How it works

An action of Falling that leads to Walking. Starts from Ground Pound, on: Action. Committed until it lands; interrupts Ground Pound; its kind of air move is pound, which a flight may forbid. Ends when the belly slide stops, or on a bonk, then the Walking mode and the Falling mode.

Lunge: press the action button during a ground pound to lunge forward, as in modern 3D platformers: a quick hop under heavy gravity, at a set speed whatever came before. The stick cannot speed it up; pulling back slows it and sideways steers it a little. It cannot be cancelled in the air; running into a wall bonks off it. Landing with crouch held rolls on (Roll); otherwise the character slides to a stop on its belly, and can jump out of that. There is no lunge from the ground.

The motor's Body Facing must be States. Numbers from the modern 3D platformer measurements (D44); the sideways cap, the bonk and the belly slide are not published and are choices.

Combine it

  • Needs: Air Move, Ground Pound. The Inspector warns while one is missing.
  • Priority 27: 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: Modern Platformer.

Properties

PropertyDescriptionRangeDefault
CharacterThe character this module belongs to. Drag its Character Motor here.None
Up SpeedUpward speed of the lunge's hop, m/s.0 or more19.8
Gravity ScaleGravity is multiplied by this during the lunge.0 or more1.333
SpeedForward speed the lunge sets, m/s.0 or more15.2
BrakeHow quickly pulling the stick back slows the lunge, m/s².0 or more22.8
Minimum SpeedPulling back cannot slow the lunge below this, m/s.0 or more1.9
Steer AccelerationHow quickly a sideways stick steers the lunge, m/s².0 or more5.7
Steer SpeedFastest sideways drift, m/s.0 or more3.8
Bonk SpeedSpeed the character bounces back off a wall it dives into, m/s.0 or more2
Slide DecelerationHow quickly the belly slide after landing slows down, m/s².0 or more20
Slide TimeLongest belly slide after landing, seconds.0 or more0.5

Additional resources