summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2019-08-21 15:27:02 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2019-08-21 15:32:51 +0200
commita350fd4a5755fdaaecef820e181ddda4ce866830 (patch)
treeead019fdd923404c257cb0a500df76551e394615 /scene/3d
parent48eaf14030f315a915cece0d33c190c28561ca01 (diff)
Draw 3D collision shape/raycast gizmos in grayscale when disabled
This makes them easier to distinguish from their enabled counterparts, as is already done in the 2D editor.
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/collision_polygon.cpp2
-rw-r--r--scene/3d/ray_cast.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp
index db07059b32..37aa95fb43 100644
--- a/scene/3d/collision_polygon.cpp
+++ b/scene/3d/collision_polygon.cpp
@@ -151,6 +151,8 @@ float CollisionPolygon::get_depth() const {
void CollisionPolygon::set_disabled(bool p_disabled) {
disabled = p_disabled;
+ update_gizmo();
+
if (parent) {
parent->shape_owner_set_disabled(owner_id, p_disabled);
}
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp
index 10f92058e0..30eed8f1a7 100644
--- a/scene/3d/ray_cast.cpp
+++ b/scene/3d/ray_cast.cpp
@@ -102,6 +102,8 @@ Vector3 RayCast::get_collision_normal() const {
void RayCast::set_enabled(bool p_enabled) {
enabled = p_enabled;
+ update_gizmo();
+
if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint())
set_physics_process_internal(p_enabled);
if (!p_enabled)