Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | dang_ |
Hi, I’m really confused about how I can get my player to collide with an object and set that as a child node. The object is a balloon and currently, it is set so that when it collides with the player it queue_free(). I would like the player to be able to connect that object as a child node so that it can be used later in the game that makes sense.
P.S. the player is a kinematic body and the ballon is an area2d
you could queue_free() the map instance as you instance one as the player child
ArthurER | 2020-10-07 13:10
Like ArthurER said.
Or, you can get_parent().remove_child so that the balloon is free and then
player.add_child(balloon_instance).
sxkod | 2020-10-07 15:01