CMCharacter Modules 0.1.0

Crouch

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

Ducks the character lower and slower. It fits under low ceilings and starts crouch moves.

Ducking down: lower, slower, able to fit under low ceilings, and the start of crouch moves such as the backflip, the long jump and the roll.

Inspector
▼Crouch⋮
CharacterCharacter (Character Motor)
Crawl Speed1.08
Crawl Acceleration11.1
Turn Rate337.5
Stand Still Speed0.5
The Crouch component in the Inspector, with its defaults.
Origin. Half-Life (1998) for ducking under things; Super Mario 64 (1996) for crouch as the start of other moves.

How it works

An action of Walking. Starts from any state, on: Crouch held, slow. Ends when Crouch is let go, then the Walking mode.

Crouch: hold crouch while standing still to duck, as in classic 3D platformers; with the stick, crawl slowly, the body turning toward the stick as when walking. Jumping from a crouch is a Backflip; crouch pressed while moving is a crouch slide (the Slide state) instead. With Crouch Height, the collision shape is lowered while crouching, so the character fits through low gaps; under a low ceiling it stays crouched even when crouch is let go, until there is room to stand. Numbers from the classic 3D platformer study (D33).

Combine it

  • Priority 12: 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, Modern Platformer.

Properties

PropertyDescriptionRangeDefault
CharacterThe character this module belongs to. Drag its Character Motor here.None
Crawl SpeedCrawling speed with the stick fully tilted, m/s.0 or more1.08
Crawl AccelerationHow quickly crawling reaches its speed, m/s².0 or more11.1
Turn RateHow fast the body turns toward the stick while crawling, degrees per second.0 or more337.5
Stand Still SpeedOnly a character moving slower than this crouches, m/s; faster, crouch is a slide.0 or more0.5

Additional resources