the object is deleted when a child node is added

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By BOX_Milk

I wanted to implement the selection of subjects
It consists in the fact that the item is in the player
Like on a belt
I decided to just add the item as a child node
But when lifted, the object simply disappears
Please help, there are no errors
The video is completely at the bottom

Video YouTube

When you start the game look at the remote view of the editor both before and after item pickup as it’s very likely the position of the belt is being reset to Vector2(0, 0)

What you can do is set the global_position to the player’s position + an offset

Wakatta | 2023-02-18 20:30

:bust_in_silhouette: Reply From: CallMeRED

I’m not sure… but it looks like after you add the wood(Area2D) to player,
wood detects collision again with player and remove itself + add itself infinitely at each frame ?