-
Notifications
You must be signed in to change notification settings - Fork 85
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
Pivot points and sorting issues #179
Comments
Any updates on this? Pretty frustrating that it's ignoring pivot points. Kinda wondering why in the world it would be this way since tile sizes and character sizes can vary greatly... |
Unfortunately no. I was working on dozens of little projects at the time just to see if I could do it. So non of them were really serious projects and thus abandoned when running into too much hardship :P -Ferdy |
Messing with the z custom sort and sprites z pos seems to help somewhat |
让Transparency Sory Axis的(x,y,z)的y/z = 图片大小的宽/高,能完美解决等距地图的这个遮挡问题。 |
|
Hi,
Not sure if this is an issue, or me not understanding something correctly. I'm currently messing around with an isometric view. The Unity default tilemapping left much to be desired due to the inability to (easily) paint prefabs. So I was looking for a better solution. Tiled + SuperTiled2Unity seemed pretty nice (and it was all free too! Perfect for just messing around and experimenting). Tiled offers a nice way of making maps and (theoretically) importing the result in Unity should be a snap.
However, I just can't seem to get the sprite sorting correct. I understand my character would traverse the Sort Order based on the 'elevation' level they are at, so objects on a lower elevation will appear behind the character sprite. It's objects on the same level that are giving me a headache though.
From what I've been reading, this is supposed to be handled through the Custom Sorting Axis and the Pivot Points of the sprites. So, I exported my test map, imported it in Unity, sliced the tilesheet and set the Pivot Point for one of the sprites of the map.
However, it seems like ST2U creates a copy of the tilesheet and uses that to create new sprites. The objects it creates all have their Pivot Points set to the absolute bottom left, resulting in incorrect sorting.
Here the character is correctly placed behind the environment. If I move it slightly down however, the character is in front of the environment as seen below.
I want the character to start appearing in front at about this point, based on the Pivot Point:
If I drag the sprite directly from my tileset onto the scene, it works as expected:
I tried creating a custom importer to add a new object onto the scene for each tile and just hide the ones made by ST2U, but I'm having trouble accessing the actual tilesheet asset. And even if I could, I can't easily grab the actual sprite, since ST2U counts empty spaces when slicing, so the names and indexes for the sprites used by ST2U do not match up with my sliced asset.
Chances are, I'm overlooking something, or doing something wrong, but it's driving me nuts so any help would be appreciated :)
-Ferdy
The text was updated successfully, but these errors were encountered: