Can someone give us a crash course on this?
We set everything up as specified:
Character, Tilemap, and tilemaplayers all have Y-sorting enabled, and are on the same layer, we lowered the y sort origin to the base of the sprite, and it's still appearing in front of the character.
We have tried:
*Enabling y-sort only on the parent node that contains nodes we want to y-sort
*Enabling y-sort on the base node, putting character in base node instead of tilemap
*Moving texture origin to the bottom of the tree's tile
*Moving texture origin to the bottom of the player's tile
*Resetting the tree tile's origin offset
*Having the player on a lower Z-index than the tree
*Having the player on a higher Z-index than the tree
*Having the player and tree on the same Z-index
*Updating to a new version of Godot, changing the tilemap into TileMapLayers
#y-sorting doesn't work
64 messages · Page 1 of 1 (latest)
please fucking help us
we feel like crying
this was supposed to be an easy starter project to learn the engine
we're working from a tutorial
what are the z-indices of the layers of your tilemap?
1
is the green background a separate node or part of the tilemap? you could also try moving the player ahead of the tilemap in the scene tree
part of the tilemap
well, here:
all layers are on the same z-index?
if the top of the tree is doing what you want, try drawing the bottom part of the tree on a layer with a lower z index
this is an example i made after upgrading the project to 4.3 and using tilemaplayers. the background (road, grass) are on the lowest z-index 0. the base of the lamppost is also on z-index 0 but on a different layer. the player sprite is on z-index 1. the top of the lamppost is on yet another layer 2
I recently had a bunch of problems with y-sorting too. I'm not super experienced with this stuff but I figured mentioning what solved it for me, as maybe you have the same problem?
What I did to make it work was to enable y-sorting on the tilemap layer nodes, the parent for all the tilemaps (Node2D), and the parent of that parent (world). Since the player is a parent of World, it does not need to have y-sort on. I imagined that this would also mean that the tilemap layer parent doesn't need to either, but for some reason it does
yes
we considered this, but there are objects that we need the player behind and in front of that are 1x1 tiles
Literally all the layers have y-sort enabled
Including Node2D and world?
yes
Aah damn. Sorry but that was my only idea for what the issue could be 
btw, CHaracter does not need to have YSort enabled
that isn't what the tutorial said, but we tried it and it hasn't helped
(no disrespect, thank you for offering help)
YSort controls how the children are sort.
what is the origin of you character?
is it at its feet?
move to its feet
we put it at the character's feet, it didn't work
It should be at its feet
ok, we'll try again
done, didn't help
same for the tile ysort origin
same result
well, baby steps
^
you said you changed all z-index to be the same
ok
reset ALL z_index
including the individual tiles
don't forget the ANimatedSPrite on the player as well
character and its children do not need YSort enabled
ok, done
like set all z_index to 0, right?
yes
is thiago rocha your first and last name?
We're literally putting you in the fucking credits
