Vigyata.AI
Is this your channel?

You’re Sorting Nodes Wrong in Godot (Stop Using Z-Index)

282 views· 12 likes· 6:11· Feb 18, 2026

🛍️ Products Mentioned (16)

🎓 Learn Game Development & AI ✨ 📚 All my courses are available on Skillshare: access them ALL with just ONE subscription. ✨ Enjoy 1 month free + 60% off your first month: https://www.skillshare.com/en/r/profile/Marco-Paoletta/18838753 🎯You can also get them separately on Udemy: These links may include exclusive, time-limited discounts—don’t miss out. 🎮 GODOT COURSES 🎯 How To Create Complete A Godot Game - Full Course!: https://www.udemy.com/course/how-to-create-games-with-godot-4-3-for-beginners/?couponCode=NOV-2025 → Create one full endless runner game in about 5 hours. 🔥 Godot 4 Fast Lane: Game Development for Absolute Beginners: https://www.udemy.com/course/godot-4-fast-lane/?couponCode=NOV-2025 → Learn Godot in 4 hours in a practical way focused on learning what you need to create your own projects. 📘 How To Create Games In Godot - No Experience Needed!: https://www.udemy.com/course/how-to-create-games-in-godot-no-experience-needed/?couponCode=NOV-2025 → A comprehensive 11 hour guide to learn mostly everything about Godot. 🤖 CHAT GPT COURSE 🚀 ⚡ ChatGPT for Professionals: AI Productivity Mastery (GPT-5): https://www.udemy.com/course/chatgpt-for-professionals-ai-productivity-mastery-gpt-45/?couponCode=SEP-2025 → Learn how to integrate AI into your workflow and work more efficiently to get more things done in less time. 🕹 UNITY COURSE 🏰 🛡 Unity And C# Full Course: Make a Complete 2D RPG Game: https://www.udemy.com/course/learn-to-create-a-2d-rpg-in-unity-6/?couponCode=NOV-2025 → A full comprehensive 20+ hour guide where we create a fully customizable RPG game. 🐍 PYTHON COURSE 💡 Python for Absolute Beginners: Start Coding Today: https://www.udemy.com/course/python-for-absolute-beginners-start-coding-today/?couponCode=NOV-2025 → Understand programming fundamentals and start building your coding skills from scratch. ------------------------------------------- Join this channel to get access to perks: https://www.youtube.com/channel/UCK7nhJBW05-tCmbmvbHThmw/join 📡CONTACT📬 Job offers, YouTube collaborations, etcetera: ➤✉️Email: letta.corporation@gmail.com ➤🔵LinkedIn: https://www.linkedin.com/in/marco-paoletta/ ▶️PLAYLISTS🎥 Godot: Full Courses: https://youtube.com/playlist?list=PLX91FzZ_h1OBryEAM9VnznwA8hSAENeD1&si=BaYpk-KKDhY-asaP Godot: Tutorials: https://www.youtube.com/playlist?list=PLX91FzZ_h1ODdeeja8qj87uXhjEebfImq Godot: Addons: https://www.youtube.com/playlist?list=PLX91FzZ_h1OATCglSqMhMJmKD66E9hpwU Godot: Tips & Discussions: https://www.youtube.com/playlist?list=PLX91FzZ_h1OBUN0Xkegy9qpjmy5r3U7-S Godot: Best Games: https://www.youtube.com/playlist?list=PLX91FzZ_h1OALTLCr6qG3JkKnouTPWa5K Godot: Godot: How To Make Games In Mobile: https://www.youtube.com/playlist?list=PLX91FzZ_h1OA76ytWDKVJbOe3TDgfR-Dy Game Dev.: Advises: https://www.youtube.com/playlist?list=PLX91FzZ_h1OBRPiLSBPybGXkmIwSA7oph Game Dev.: Job & Money: https://www.youtube.com/playlist?list=PLX91FzZ_h1OBFgw6m0SpagXBlWl8SKvKP Unity: Tutorials: https://www.youtube.com/playlist?list=PLX91FzZ_h1OB0ItgAAYWb2T5SOAx9kSdl 🎮MY GAMES🕹️ ➤Match 3 Pass: https://play.google.com/store/apps/details?id=com.LettaCorporation.Match3Pass&hl=en&gl=US ➤Shake It and Find It: https://play.google.com/store/apps/details?id=com.LettaCorporation.ShakeItandFindIt&hl=es_419&gl=US ➤Circle Combat: https://play.google.com/store/apps/details?id=com.LettaCorporation.CircleCombat&hl=es_AR&gl=US ➤World Cup Collector: https://play.google.com/store/apps/details?id=com.LettaCorporation.WorldCupCollector ➤Swipe Never Stop: https://play.google.com/store/apps/details?id=com.LettaCorporation.SwipeNeverStop ➤Protect the UFO: https://play.google.com/store/apps/details?id=com.LettaCorporation.ProtecttheUFO 🎵MUSIC🎶 ➤Song: Tokyo Music Walker - Way Home License: Creative Commons (CC BY 3.0) https://creativecommons.org/licenses/by/3.0 https://www.youtube.com/channel/UC3lLfvhpPGtwd5qD25cMDcA Music powered by BreakingCopyright: https://breakingcopyright.com ➤Patrick Patrikios https://www.youtube.com/watch?v=XO3WVCcGKzA ➤Alva Majo channel theme https://www.youtube.com/watch?v=qtSByF6qxik ➤Music: Evan King - CHIPTUNE ♫ 20XX https://www.youtube.com/ContextSensitive https://contextsensitive.bandcamp.com/ ➤Zelda II The Adventure of Link Town Theme Orches https://youtu.be/h5fA4Iyp7uA?si=7pX2N-CixnYRgc04 ➤Haters Gonna Hate - smol edition (Cannot find the link, if you have it please share it with me by Discord. The link is above) It seems that this is the end of the description. If you liked the video, consider subscribing so that YouTube notifies you when I upload new useful content :) Have a nice day!

About This Video

In this video I show you why I basically never use Z-index for 2D sorting in Godot, even though it’s what most people do first. The “player is Z-index 10, road is 5, decorations are 7” approach gets super counterintuitive really fast. The moment your project grows and you have dozens of overlapping objects, you end up constantly checking the Inspector and trying to remember numbers instead of actually building your game. What I use instead (and what I recommend you start using right now) is the draw order in the scene hierarchy—Godot works like a photo editor. Godot draws from top to bottom: background first, then road, then player trail, then player, and so on. It’s instantly readable: I can look at the hierarchy and immediately understand what’s on top of what. Then I address the real question: “Okay, but what about runtime spawning?” For vehicles, decorations, coins, etc., I organize them into container nodes (simple Node2D containers) and always add instantiated scenes into the correct container. That way, the sorting stays consistent and intuitive even when objects are spawned during gameplay.

Frequently Asked Questions

🎬 More from Letta Corporation