summaryrefslogtreecommitdiff
path: root/scene/2d/collision_shape_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/collision_shape_2d.cpp')
-rw-r--r--scene/2d/collision_shape_2d.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index 85751fc735..56f68ae634 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -77,6 +77,11 @@ void CollisionShape2D::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
unparenting=false;
can_update_body=get_tree()->is_editor_hint();
+ if (!get_tree()->is_editor_hint()) {
+ //display above all else
+ set_z_as_relative(false);
+ set_z(VS::CANVAS_ITEM_Z_MAX-1);
+ }
} break;
case NOTIFICATION_LOCAL_TRANSFORM_CHANGED: {
@@ -120,6 +125,7 @@ void CollisionShape2D::_notification(int p_what) {
rect=Rect2();
+
Color draw_col=get_tree()->get_debug_collisions_color();
shape->draw(get_canvas_item(),draw_col);