Godot Version
4.6
Question
In my TowerDefense game I got to the part that I need to solve the Y-Sort of all of my objects in my levels. For starters I have a Root node called LevelRoot where all of the gameplay will be happening. When You choose a level then that level is loaded through code and inside the level my tree is like follows:
LevelRoot
- Stage01
-
- GroundTileMap
- PathTileMap
- Y-SORT - Node2D
-
- WorldObjectTileMap
- TowerContainer
- EnemyContainer - This is what I added still not implemented
- Path2D
So the Wavespawner creates and Enemy and a PathFollow2D and adds it to the Path2D and they move along the path. I tried putting the Path2D under the Y-sort Node but after searching online I learned that due to the enemies are far under the Path2D tree they won’t Y-sort correctly.
One way that I saw online that was used as a solution was through a RemoteTransform2D but all of the videos and posts that I found were from a couple of years back and I wanted to ask if there was another solution to this now.
I am asking to learn more before I start implementing all of these changes.
Thank You for your time.