CMCharacter Modules 0.1.0

Pressure Pad

Kind: World component · Add Component: Character Modules > World > Pressure Pad

A plate pressed by standing, a heavy object or a hard landing. It opens doors and starts machines.

A plate pressed by standing on it, by a heavy enough object, or only by a hard landing such as a ground pound. It opens doors and starts machines.

Inspector
▼Pressure Pad⋮
Minimum Landing Speed0
Rigidbodies PressOn ▾
Minimum Mass5
Pressed(no listeners)
Released(no listeners)
The Pressure Pad component in the Inspector, with its defaults.
Origin. The Legend of Zelda (1986); ground-pound switches from Super Mario 64 (1996).

How it works

A pressure pad: a solid collider that is pressed while a character stands on it (heard through Contact Events) or a heavy enough Rigidbody rests on it (heard through Unity's collision messages). Pressed and Released fire when that changes, so a crate left on the pad holds a door open. It can ask for a hard landing instead of a step, like a ground pound.

Properties

PropertyDescriptionRangeDefault
Minimum Landing SpeedA character must land on the pad at least this fast to press it, m/s. 0: stepping on is enough.0 or more0
Rigidbodies PressRigidbodies resting on the pad press it too.On
Minimum MassLightest Rigidbody that presses the pad, kg.0 or more5
PressedCalled when the pad goes down.(no listeners)
ReleasedCalled when the last thing leaves the pad.(no listeners)

Additional resources