From eab1e5b5967ccebf00ce1d456eb1fd6ee28ec96d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 12 Jan 2016 05:53:59 -0300 Subject: small hack to make collisionobjects work with replace, fixes #2992 --- tools/editor/scene_tree_dock.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index 75f1597b20..89036d2581 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -1268,6 +1268,11 @@ void SceneTreeDock::_create() { editor->set_edited_scene(newnode); } + //small hack to make collisionshapes and other kind of nodes to work + for(int i=0;iget_child_count();i++) { + Node *c=newnode->get_child(i); + c->call("set_transform", c->call("get_transform") ); + } editor_data->get_undo_redo().clear_history(); newnode->set_name(newname); -- cgit v1.2.3