Y sort origin on StaticBody2D

Godot Version



I was making a 2D Top-Down, game, and I wanted to create a breakable tree, but I noticed that I can’t apply a Y-sort origin on a StaticBody2D.
Can somebody help me to do this?

Y-sorting will simply use the y-position of your StaticBody2D. If it’s not in the right place, move it! If it has any child nodes, you may need to reposition those as well.

and how can I move the y position of the staticbody?

Like you change the position of any other node: drag and drop it where you want it to be (i.e. up or down), or change its position.y property from a script.

1 Like