Is there a way to reparent a node within itself to a specific node

  • xyz replied to this.
  • The_Grass_man Just call add_child(self) on a new parent. Since nodes can have only one parent, it will remove it from the current parent and reparent it to the new one.

    The bot could use a lengthy maintenance shutdown 🙂

    ?

    No, it is not possible to reparent a node within itself to a specific node. A node must always have a single parent, and therefore cannot be reparented another node within itself.

    The_Grass_man Just call add_child(self) on a new parent. Since nodes can have only one parent, it will remove it from the current parent and reparent it to the new one.

    The bot could use a lengthy maintenance shutdown 🙂

      The_Grass_man Yeah, you need to get a reference to the new parent node and then call add_child(self) as its method. You can get it either by specifying the relative or absolute path to the parent directly or by calling get_node(). Just make sure that the path is correct.