0 votes


I have a grid container which I am using for an inventory display. The problem is when the slots overlap, they are layered in the wrong way. I need the layering to be reversed, so that the highlighted slots are the ones on top. Usually I would just reorder the children in the scene tree, but doing so in this case would also change the order of the items in the grid container. I tried using canvas layers, but it also didn't work (probably because they aren't control nodes)

Does anyone have any ideas about how to solve this?

Godot version 3.2.3
in Engine by (12 points)

1 Answer

0 votes

Node2D inheriting Nodes have a z_index property that allows you to tweak what appears in front of what.

If it does not work, you can always make you own custom Container, to control exactly how things are placed.

by (2,688 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.