diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 947e6a3d4c0..af43799e191 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -416,7 +416,7 @@ - Returns the global transform matrix of this item. + Returns the global transform matrix of this item, i.e. the combined transform up to the topmost [CanvasItem] node. The topmost item is a [CanvasItem] that either has no parent, has non-[CanvasItem] parent or it has [member top_level] enabled. diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index 1dc28d91c5e..6ef02884a31 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -168,9 +168,6 @@ Transform2D CanvasItem::get_screen_transform() const { } Transform2D CanvasItem::get_global_transform() const { -#ifdef DEBUG_ENABLED - ERR_FAIL_COND_V(!is_inside_tree(), get_transform()); -#endif if (global_invalid) { const CanvasItem *pi = get_parent_item(); if (pi) {