How can GODOT move objects through layers / levels / anchors in the scene tree?

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

I have a multiplayer game for 2-10 people. The problem arose in the fact that I want to implement “multi-level movement of players inside the scene tree”(that is, if a player has a position.y will be greater than all the others, then it will be on the last layer; if position.if y is less than one of the players, but more than all the other players, it will be moved to the penultimate layer; and so on … ). Is there such a command to move an object through levels in the scene tree or to reassign its parent element (without deleting it and adding it again to the original parent element)?

Have you looked at manipulating the Canvas Layers instead?

Ertain | 2020-01-26 20:50