add 'step-height' entity property

This commit is contained in:
MihailRis 2026-02-13 02:48:40 +03:00
parent 99106df230
commit 0f63fd64ed
5 changed files with 7 additions and 1 deletions

View file

@ -42,6 +42,9 @@ struct EntityDef {
/// @brief Does entity prevent blocks setup
bool blocking = true;
/// @brief Max obstacle height that does not require jumping
float stepHeight = 0.5f;
/// @brief save-** flags
struct {
bool enabled = true;

View file

@ -80,4 +80,5 @@ void Rigidbody::initialize(
create_sensor_callback<scripting::on_sensor_enter>(entities),
create_sensor_callback<scripting::on_sensor_exit>(entities)};
}
hitbox.stepHeight = def.stepHeight;
}