diff --git a/modules/viscosity/enemy_orb.cpp b/modules/viscosity/enemy_orb.cpp index cafd8398..96f9a8fc 100644 --- a/modules/viscosity/enemy_orb.cpp +++ b/modules/viscosity/enemy_orb.cpp @@ -25,9 +25,9 @@ void EnemyOrb::shoot() { } get_tree()->create_timer(this->shoot_delay)->connect("timeout", callable_mp(this, &EnemyOrb::shoot)); Node3D *inst{ cast_to(this->projectile->instantiate()) }; - inst->set_position(get_global_position()); - inst->set_rotation(get_global_rotation()); - get_tree()->get_current_scene()->add_child(inst); + inst->set_position(get_position()); + inst->set_rotation(get_rotation()); + get_parent()->add_child(inst); } void EnemyOrb::body_entered(Node3D *body) {