0 votes

I have an isometric TileMap which uses y-sorting. It works great, expect when AnimatedSprites (children of TileMap) share the same y coordinate because I want some AnimatedSprites to appear over others when they share the same y coordinate.

My hope is to be able to set TileMap cells and AnimatedSprite's z-index to create my own custom sorting. It's important to note that the TileMap cells contain walls.

Possible?

Thank you for your time.

in Engine by (91 points)
edited by

1 Answer

0 votes
Best answer

Hmm, well according to eons, there doesn't seem to be a way.

https://godotengine.org/qa/15993/can-i-specify-z-index-for-tile-in-tileset-tilemap

I have a hack way of doing it, which is to increase the y coordinate one pixel for the sprite I want to display above, and then minus one from the sprite's y offset to appear as if it's not 1 pixel below the other. I hate this, but it's all I can come up with, unless someone else has a better idea..?

by (91 points)
selected by
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 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 webmaster@godotengine.org with your username.