summaryrefslogtreecommitdiff
path: root/scene/2d/collision_polygon_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/collision_polygon_2d.cpp')
-rw-r--r--scene/2d/collision_polygon_2d.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 1479cb7881..616d3da7c9 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -113,6 +113,12 @@ void CollisionPolygon2D::_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_EXIT_TREE: {
can_update_body=false;