diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-03-26 16:20:30 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-03-26 16:20:30 +0100 |
commit | 0d772c6e6ecf210fa5b38df790b448cb80d4eb8c (patch) | |
tree | c73a58e37852fdf6be7a5dc4a126f5e2bac96928 /scene/resources/height_map_shape_3d.cpp | |
parent | 188ca5470b11222f3caf27082cfadce861dbaa60 (diff) | |
download | redot-engine-0d772c6e6ecf210fa5b38df790b448cb80d4eb8c.tar.gz |
Improve range property hints for various collision shapes
Fixes #36419.
Co-authored-by: Andrii Doroshenko (Xrayez) <xrayez@gmail.com>
Diffstat (limited to 'scene/resources/height_map_shape_3d.cpp')
-rw-r--r-- | scene/resources/height_map_shape_3d.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/resources/height_map_shape_3d.cpp b/scene/resources/height_map_shape_3d.cpp index 121930d86f..824dc4a544 100644 --- a/scene/resources/height_map_shape_3d.cpp +++ b/scene/resources/height_map_shape_3d.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "height_map_shape_3d.h" + #include "servers/physics_server_3d.h" Vector<Vector3> HeightMapShape3D::get_debug_mesh_lines() const { @@ -186,8 +187,8 @@ void HeightMapShape3D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_map_data", "data"), &HeightMapShape3D::set_map_data); ClassDB::bind_method(D_METHOD("get_map_data"), &HeightMapShape3D::get_map_data); - ADD_PROPERTY(PropertyInfo(Variant::INT, "map_width", PROPERTY_HINT_RANGE, "1,4096,1"), "set_map_width", "get_map_width"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "map_depth", PROPERTY_HINT_RANGE, "1,4096,1"), "set_map_depth", "get_map_depth"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "map_width", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), "set_map_width", "get_map_width"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "map_depth", PROPERTY_HINT_RANGE, "0.001,100,0.001,or_greater"), "set_map_depth", "get_map_depth"); ADD_PROPERTY(PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "map_data"), "set_map_data", "get_map_data"); } |