Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes

Does anyone know why my character is showing above the objects in game?
I've set up Y-sort and checked with the Z indices of character and the map layer but it does not work.

asked in CSC380Jan2024 by (2.5k points)

3 Answers

+3 votes

If you are using a TileMap for your world, make sure the objects in game are in there own layer that has a higher Z index than the player. Also, remember that the lower an object is placed in the Scene tab, the higher it will appear in game (in terms of what's on top). Are these objects individual nodes or tiles in a tilemap?

answered by (2.1k points)
+3 votes

I figured it out. I had my player objects grouped in a Node2D in the level and that is why the z sort would not work with the moving player. I just took them out of the node and it worked fine

answered by (2.5k points)
+2 votes

are you talking about drawing order?

answered by (3.8k points)
...