why Ysort wont work in godot3?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By potatobanana

why Ysort wont work in godot3? it wont work even in disable or enable, have any idea how to fix this problem?

my node layout. did i do something wrong?
Imgur
-node
- tilemap
- Ysort
- KinematicBody2D(player)
- KinematicBody2D(mob)
- KinematicBody2D(tree)

:bust_in_silhouette: Reply From: nooberdev

If you want to use the Y-Sort option from TileMap, Node layout should look like this:

-node
    -kinematicbody2d
    -kinematicbody2d

and you set Ysort in Inspector of TileMap to on.

The way you have it now, you are sorting the player with the mob and the tree, but not with the TileMap, so caracters clip over walls

Further information here:

so Ysort wont work Between player , mob and the tree? my Ysort and tilemap under node. i did’t clip tilemap with Ysort.
Imgur: The magic of the Internet

potatobanana | 2018-08-09 18:22

I only get a 404 on your link.
If they are children of the TileMap, Y-sort applies to them. It applies even on Sprites from your TileMap and sorts the walls/floor with the other kinematicbodies.

Imgur: The magic of the Internet

nooberdev | 2018-08-09 18:31

this new link.
Imgur: The magic of the Internet
and i still dont understand why wont work. did this Ysort need to recall in func or something? as you can see i didt tie tilemap with Ysort because i want to test 3 kinematicbody2d first. but didt work between them. my player always on top of them. i check all my z_index = 0.

potatobanana | 2018-08-09 18:39

do the other bodies appear to be sorted correctly? is the “z as relative” option from the kinematicbodies on? you find it right below the z-index.

nooberdev | 2018-08-09 19:07

yeah, and all z as relative on. i even try on and off z as relative.

potatobanana | 2018-08-10 04:15

omg, today i redownload godot and load save file, still did’t work. then i make new project and copy paste all from previous work, and you know what it work like magic… so this bug or what?

potatobanana | 2018-08-10 12:08

If you copy pasted everything, then this sounds like a bug to me. Very strange that it did not work before. I am happy it works now. :slight_smile: If this happens again, I suggest you make a submission to the bug-tracker.

nooberdev | 2018-08-10 13:31

thanks i hope never happen again, you have discord?

potatobanana | 2018-08-10 15:30