Pressure Tracking: compression load
Opt-in measurement from solved Dynamic Body contacts.
First use#
body.set_pressure_tracking_enabled(true);
// After jolt_update():
var value = body.get_pressure();Disabled by default. The setter requires a Boolean and a live Dynamic body. Getters return 0 while disabled, waiting or on failure; distinguish errors with jolt_has_error(). Sensors do not provide a solved contact load.
Meaning of the measurement#
get_pressure() returns compression load in newtons (N), not pressure in pascals or mass. It derives from solver contacts in the last completed step and includes supported CharacterVirtual loads.
Lifetime and limitations#
Enabling Pressure Tracking does not wake a sleeping body; its first measurement waits for fresh solved contacts. Stable sleeping support can use a cached sample; configuration and contact changes invalidate it. Zero alone therefore does not prove an unloaded body.
Complete API declarations#
Declarations match the production GML sources. A value after = marks an optional argument. This is a signature inventory; the guide sections describe meaning, units and limitations. The type before a dot identifies the method owner, not a global function.
| Symbol / owner | Signature / value |
|---|---|
| JoltBody.get_pressure | JoltBody.get_pressure() |
| JoltBody.set_pressure_tracking_enabled | JoltBody.set_pressure_tracking_enabled(enabled) |