diff options
Diffstat (limited to 'scene/3d/node_3d.cpp')
-rw-r--r-- | scene/3d/node_3d.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index a0382b73dc..66e8831d15 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -623,6 +623,14 @@ void Node3D::set_disable_gizmos(bool p_enabled) { #endif } +void Node3D::reparent(Node *p_parent, bool p_keep_global_transform) { + Transform3D temp = get_global_transform(); + Node::reparent(p_parent); + if (p_keep_global_transform) { + set_global_transform(temp); + } +} + void Node3D::set_disable_scale(bool p_enabled) { data.disable_scale = p_enabled; } |