diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-17 10:15:11 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-24 16:03:05 -0700 |
commit | 45c7af98625a1751f2a97aaf2a4a17d808b61092 (patch) | |
tree | c380f56cf612c6edff37bf0a38b04761789bb951 /editor/import/resource_importer_scene.cpp | |
parent | c89a5fb8be579936ea0b56bde520133cfa7664ae (diff) |
Restore RayShape as a regular shape type
Partial revert from previously removing ray shapes completely, added
back as a shape type but without the specific character controller code.
Diffstat (limited to 'editor/import/resource_importer_scene.cpp')
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 2b03ad928c..ef5e124ad9 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -45,6 +45,7 @@ #include "scene/resources/animation.h" #include "scene/resources/box_shape_3d.h" #include "scene/resources/packed_scene.h" +#include "scene/resources/ray_shape_3d.h" #include "scene/resources/resource_format_text.h" #include "scene/resources/sphere_shape_3d.h" #include "scene/resources/surface_tool.h" @@ -379,6 +380,11 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<E BoxShape3D *boxShape = memnew(BoxShape3D); boxShape->set_size(Vector3(2, 2, 2)); colshape->set_shape(boxShape); + } else if (empty_draw_type == "SINGLE_ARROW") { + RayShape3D *rayShape = memnew(RayShape3D); + rayShape->set_length(1); + colshape->set_shape(rayShape); + Object::cast_to<Node3D>(sb)->rotate_x(Math_PI / 2); } else if (empty_draw_type == "IMAGE") { WorldMarginShape3D *world_margin_shape = memnew(WorldMarginShape3D); colshape->set_shape(world_margin_shape); |