diff options
| author | Juan Linietsky | 2015-12-12 08:11:36 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-12-12 08:11:36 -0300 |
| commit | 9251298f46537cde669e66ed740c9987678c4617 (patch) | |
| tree | d0c88201f7d128cfee10a9d2f3fa3aa7ffb15169 /scene/2d/collision_polygon_2d.cpp | |
| parent | 990690f9f53ec3f042d6df174fff05f2de25ca3d (diff) | |
| download | godot-9251298f46537cde669e66ed740c9987678c4617.tar.gz godot-9251298f46537cde669e66ed740c9987678c4617.tar.zst godot-9251298f46537cde669e66ed740c9987678c4617.zip | |
-collision debug is shown above all else, fixes #2985
Diffstat (limited to 'scene/2d/collision_polygon_2d.cpp')
| -rw-r--r-- | scene/2d/collision_polygon_2d.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index 1479cb788..616d3da7c 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; |
