mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
add 'step-height' entity property
This commit is contained in:
parent
99106df230
commit
0f63fd64ed
5 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue