How do I put a sprite on top of another?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By HarryCourt
:warning: Old Version Published before Godot 3 was released.

Is this possible? And if so, do I have to code it in or is it just a few clicks?

Thanks.

What prevents you from adding two Sprite nodes to your scene?

timoschwarzer | 2017-07-21 12:58

:bust_in_silhouette: Reply From: Zylann

In 2D, sprites are drawn in the same order in which they appear in the scene tree. So if you have this:

Root

  • Sprite1
  • Sprite2

Then Sprite2 will be on top of Sprite1.

If Sprite1 is a child of Sprite2, you can check the Behind Parent option in the inspector for Sprite1.

Finally, if no other solution work, you can adjust the Z property.

Thanks for the answer

HarryCourt | 2017-07-22 01:35