Godot: Condition ' !is_inside_tree() ' is true. returned: get_transform() C Source: scene/2d/canvas_item.cpp:369

Created on 1 Oct 2018  路  2Comments  路  Source: godotengine/godot

Godot version:
3.0.6/3.1 alpha 1

OS/device including version:
Windows 7/10

Issue description:
0:00:00:0953 - Condition ' !is_inside_tree() ' is true. returned: get_transform()

Steps to reproduce:
I am instancing a Node2d via gdscript then using the following code:

var node = player.instance()
node.set_global_rotation_degrees(node.get_global_rotation_degrees()

Which give the following error multiple times:

3.0.6

0:00:00:0953 - Condition ' !is_inside_tree() ' is true. returned: get_transform()

Type:Error
Description:
Time: 0:00:00:0953
C Error: Condition ' !is_inside_tree() ' is true. returned: get_transform()
C Source: scene/2d/canvas_item.cpp:369
C Function: get_global_transform

3.1 alpha 1

0:00:01:0426 - Condition ' !is_inside_tree() ' is true. returned: get_transform()

Type:Error
Description:
Time: 0:00:01:0426
C Error: Condition ' !is_inside_tree() ' is true. returned: get_transform()
C Source: scene/2d/canvas_item.cpp:362
C Function: get_global_transform

archived

Most helpful comment

I think this means you can only set the global rotation when its inside the tree. Try adding it as a child first.

All 2 comments

I think this means you can only set the global rotation when its inside the tree. Try adding it as a child first.

Oh thank you. I thought it was a bug. You were right

Was this page helpful?
0 / 5 - 0 ratings