Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpriteDepthInMap not working at all #162

Open
phil123456 opened this issue Mar 10, 2018 · 4 comments
Open

SpriteDepthInMap not working at all #162

phil123456 opened this issue Mar 10, 2018 · 4 comments

Comments

@phil123456
Copy link

phil123456 commented Mar 10, 2018

Hello,

I keep changing my sprite "sorting order", "order in layer", and "interact with layer" options

the sprite is always above or always under the layer above the ground

z sorting does not work

my tilemap appear to be sliced and changing "tileset height" also seems to change the map slicing

as I go up or down, my sprite z value changes accrdingly but it's like all horizontal slices of map are on the same z value

any advice/tutorial ?

[edit : been checking the depth shader, it does not even seem to do anything additional concerning z sorting ...is this feature still supported ?]

thanks

@phil123456 phil123456 changed the title exported tiles are grouped and unsortable SpriteDepthInMap not working at all Mar 11, 2018
@phil123456
Copy link
Author

anyone ? please ?

@Seanba
Copy link
Owner

Seanba commented Mar 11, 2018

Hi Phil. I've never really got depth sorting with Tiled2Unity to work in an acceptable way. Right now, if I was stuck with Tiled2Unity I would use Object Layers (and Tile objects) instead of Tile Layers. Then, I would craft a custom importer that would assign a "sorting order" to each tile in a way that made sense (probably making it a function of the y-position). Then, as my player sprite moves around the map I would set its sorting order based on y-position and I would get the behavior I wanted.

Granted, that does take some work. My apologies.

FWIW, I'm working on a new Tiled exporter that will use the new Unity Tilemap features. Getting proper sorting, especially for isometric maps, is one of the goals as well. That's at least a couple weeks, however, and depends on some fixes from Unity that I've reported along the way.

@phil123456
Copy link
Author

phil123456 commented Mar 12, 2018

object layers in Tiled? but then I wont get the nice functionalities of a tile map and stuff
and I would have to write an importer in unity that creates tiles manualy, I wonder about performances then
how about using only one layer in unity and then modifying the "order in layer" in real time ?

I wrote a c++ SDL prgram that does import your tiled json format, maybe I could give it a try in unity, using "Order In Layer" dynamicaly

@phil123456
Copy link
Author

phil123456 commented Mar 12, 2018

for info, this guy managed it to make it work but doing the same setup I cant achieve the same result
https://gamedev.stackexchange.com/questions/154714/tiled2unity-depth-sorting-issue-with-multiple-layers/155297#155297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants