diff options
-rw-r--r-- | editor/spatial_editor_gizmos.cpp | 9 | ||||
-rw-r--r-- | scene/resources/height_map_shape.cpp | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index 104bac190e..67cbcf5de4 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -58,6 +58,7 @@ #include "scene/resources/concave_polygon_shape.h" #include "scene/resources/convex_polygon_shape.h" #include "scene/resources/cylinder_shape.h" +#include "scene/resources/height_map_shape.h" #include "scene/resources/plane_shape.h" #include "scene/resources/primitive_meshes.h" #include "scene/resources/ray_shape.h" @@ -3637,6 +3638,14 @@ void CollisionShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) { handles.push_back(Vector3(0, 0, rs->get_length())); p_gizmo->add_handles(handles, handles_material); } + + if (Object::cast_to<HeightMapShape>(*s)) { + + Ref<HeightMapShape> hms = s; + + Ref<ArrayMesh> mesh = hms->get_debug_mesh(); + p_gizmo->add_mesh(mesh, false, RID(), material); + } } ///// diff --git a/scene/resources/height_map_shape.cpp b/scene/resources/height_map_shape.cpp index 8cd271dab0..f763700d52 100644 --- a/scene/resources/height_map_shape.cpp +++ b/scene/resources/height_map_shape.cpp @@ -85,6 +85,7 @@ void HeightMapShape::_update_shape() { d["min_height"] = min_height; d["max_height"] = max_height; PhysicsServer::get_singleton()->shape_set_data(get_shape(), d); + Shape::_update_shape(); } void HeightMapShape::set_map_width(int p_new) { |