Reparenting in pick up system makes object disappear

Godot Version



Hey, I am making a 2D game in godot. So far I have made it that you can push cubes around. I want to also implement a pick up system for the cubes. So far I had made the detect system by giving the cubes an area2D with a collision2D a little bigger than the cube and then I check if the player entered the area. Then I made it so if you press E it picks the cube up. It reparents the cube to the player so it moves with it, but when the player picks it up the cube just disappears. I made it print out the position and it somehow teleports where it supposed to when picked up (a little above the player) and after some time it just drops (gravity is on). The whole process the cube is invisible. Could somebody help me with this?

make sure you’re checking global_position not position

1 Like

try figure out where it went, by Remote tab and find the node that got reparented, reposition the position by the inspector dock so you knew where you went wrong when reparenting it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.