This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

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?
- tilemap
- Ysort
- KinematicBody2D(player)
- KinematicBody2D(mob)
- KinematicBody2D(tree)

in Engine by (429 points)
edited by

1 Answer

+2 votes
Best answer

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


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:

by (143 points)
selected by

so Ysort wont work Between player , mob and the tree? my Ysort and tilemap under node. i did't clip tilemap with Ysort.

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.

this new link.
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.

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.

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

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?

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. :) If this happens again, I suggest you make a submission to the bug-tracker.

thanks i hope never happen again, you have discord?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.