Godot Version
Question
Hello people! I hope you are doping great! I have this error and i don’t know how to fix it. This doen’t break my game for now, but i think is better to fix it. I’m new in GDScript ![]()
Can’t change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead.
<Error C++> Condition “body->get_space() && flushing_queries” is true.
<C++ Fuente> servers/physics_2d/godot_physics_server_2d.cpp:654 @ body_set_shape_disabled()
globales.gd:19 @ instanciar()
player.gd:114 @ _on_logic_hit_box_area_entered()
The calling code is this:
var player_death_now = PLAYER_DEATH.instantiate()
player_death_now.position.x = position.x
player_death_now.position.y = position.y
Globales.instanciar(player_death_now)
Globales.cameraShake(2,1)
queue_free()
where instanciar is a variable in a autoloaded script that add a instantiated object in the very main scene tree.
This func is called before but this don’t throw any error until it gets into a func connected by signal : _on_logic_hit_box_area_entered(area)
Please help meeeee