summaryrefslogtreecommitdiff
path: root/scene/3d/ray_cast_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/ray_cast_3d.cpp')
-rw-r--r--scene/3d/ray_cast_3d.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/3d/ray_cast_3d.cpp b/scene/3d/ray_cast_3d.cpp
index b251aa38ba..f5e08b92ca 100644
--- a/scene/3d/ray_cast_3d.cpp
+++ b/scene/3d/ray_cast_3d.cpp
@@ -171,8 +171,8 @@ void RayCast3D::_notification(int p_what) {
exclude.erase(Object::cast_to<CollisionObject3D>(get_parent())->get_rid());
}
}
-
} break;
+
case NOTIFICATION_EXIT_TREE: {
if (enabled) {
set_physics_process_internal(false);
@@ -181,8 +181,8 @@ void RayCast3D::_notification(int p_what) {
if (debug_shape) {
_clear_debug_shape();
}
-
} break;
+
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
if (!enabled) {
break;
@@ -193,7 +193,6 @@ void RayCast3D::_notification(int p_what) {
if (prev_collision_state != collided && get_tree()->is_debugging_collisions_hint()) {
_update_debug_shape_material(true);
}
-
} break;
}
}