#y-sorting doesn't work

64 messages · Page 1 of 1 (latest)

ocean jasper
#

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

#

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

trim fog
#

might have to see screenshots

#

for now, of the texture origins specifically

pale wing
#

what are the z-indices of the layers of your tilemap?

pale wing
# ocean jasper 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

ocean jasper
#

well, here:

pale wing
#

all layers are on the same z-index?

pale wing
#

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

stark sorrel
# ocean jasper

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

ocean jasper
ocean jasper
ocean jasper
stark sorrel
#

Including Node2D and world?

ocean jasper
stark sorrel
#

Aah damn. Sorry but that was my only idea for what the issue could be slugshrug

little sparrow
#

btw, CHaracter does not need to have YSort enabled

ocean jasper
#

(no disrespect, thank you for offering help)

little sparrow
#

YSort controls how the children are sort.

#

what is the origin of you character?

#

is it at its feet?

ocean jasper
#

it is here,

little sparrow
#

move to its feet

ocean jasper
#

we put it at the character's feet, it didn't work

little sparrow
#

It should be at its feet

ocean jasper
#

ok, we'll try again

ocean jasper
little sparrow
#

same for the tile ysort origin

ocean jasper
#

same result

little sparrow
#

well, baby steps

ocean jasper
little sparrow
#

you said you changed all z-index to be the same

ocean jasper
#

should we just send the entire project file here?

#

yes

little sparrow
#

plase do

#

I can take a look

#

just zip the project folder

ocean jasper
little sparrow
#

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

ocean jasper
#

ok, done

little sparrow
ocean jasper
#

like set all z_index to 0, right?

little sparrow
#

yes

ocean jasper
#

is thiago rocha your first and last name?

little sparrow
#

yes

#

why?

ocean jasper
#

We're literally putting you in the fucking credits

little sparrow
ocean jasper
#

i mean we're still a little upset that it took literally 4 days of asking to get this result

#

but regardless tysm