diff options
author | JFonS <joan.fonssanchez@gmail.com> | 2019-06-03 11:59:55 +0200 |
---|---|---|
committer | JFonS <joan.fonssanchez@gmail.com> | 2019-06-03 11:59:55 +0200 |
commit | 6f31143996d08105fa762aff8612c415673af5c0 (patch) | |
tree | fd15f160b4c6940b6c1d92e876b86c7d1b49cce9 /editor | |
parent | a25e52fb72dbf86e2af1787704ce6041e7b86799 (diff) |
Add HeightMapShape mesh in CollisionShape gizmo
Diffstat (limited to 'editor')
-rw-r--r-- | editor/spatial_editor_gizmos.cpp | 9 |
1 files changed, 9 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); + } } ///// |