Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by CalamaBanana · Jan 09, 2019 at 06:56 PM · 2dtilemap2d spritesisometricsorting

How do I set up my sprites/skeletons to correctly interact with isometric sorting layers?

What I am trying to do:

Use an Isometric Tilemap, have my characters walk behind and infront of stuff
I followed this old thread to set it up: https://forum.unity.com/threads/isometric-tilemap-sorting-issues.554914/


But, I do not know how to correctly set up my characters to not "sink" into the tilemaps. Some pictures to illustrate my problem, white box sprite "sinks" into tilemap: alt text Moving behind stuff works perfectly fine, just the lower bound is wrong alt text This is what the floor tile looks like in the tile palette, surface is aligned perfectly (or well enough, I guess) with the grid: alt text From the other direction, as soon as the center of my character passes the center of the barrel tile, the barrel starts being drawn infront of my character (on this picture the floor tilemap is set to a background sorting layer, thats why there is no sinking. The barrel is on a different tilemap, on the same sorting layer as the character, thus causing a problem) alt text


What I think is the problem:

As soon as the "center" of my sprite passes the center of the tile, the tile will be drawn over my character.
How do I change this "center" of my character?
In case it's relevant, the character is made out of Anima2D bones and meshes, but has a sorting group script attached. But I have the same problem with a simple 2D sprite as well.


Edit: Short gif to illustrate the current behaviour. As soon as the center of the white square goes above the center of the tile, the tile will be drawn infront of the square. I need to either move the center of the white square somehow, or the center of the tiles.

alt text

test.gif (524.3 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by NikitaDemidov · Jan 09, 2019 at 07:19 PM

When you are pressing on the sprite in the inspector there is a "SpriteRenderer" in it you can find the field Order in Layer. Change the Number (when it is hight than you can see it in front of all the other Sprites , when it is low than you can see it behind of all the other Sprites).

I hope I UNDERSTOOD your answer correct and helped you.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image CalamaBanana · Jan 09, 2019 at 07:43 PM 0
Share

No, that was not the problem. The character needs to be on the same Order in Layer as the tilemap. I added a gif to the question to illustrate it better.

avatar image
0

Answer by chriseborn · Apr 20, 2020 at 08:54 AM

Hi @CalamaBanana

Did you ever figure out what was going on with this? I'm seeing the same thing in my scene.

Thanks C.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image CalamaBanana · Apr 20, 2020 at 05:05 PM 0
Share

I did not find a solution. I accepted that free movement does not play nice with tilemaps, which seemed to be aimed at tile-by-tile movement games. I can not say if anything changed since then, I did not try for much longer.

avatar image chriseborn CalamaBanana · Apr 27, 2020 at 01:32 PM 0
Share

Thanks @CalamaBanana ,

I got this working by rebuilding my scene and checking the things below>

Edit -> Project Settings -> Custom Sort Axis X=>0, Y=>1, Z=>0

Tilemap Settings, including $$anonymous$$ode => Individual and the Sorting Layer and Order in Layer

Character Sprite Setting, including setting the pivot to “Bottom” on all the characters sprites.

The PPU settings on the sprites for the Tilemap and Character and worked out how big things should be in game units, and then checked the transform Position and Scale were zero for both the character and the Tilemap.

As $$anonymous$$acbeth said: "I am in blood stepped in so far that should I wade no more, Returning were as tedious as go o’er,” .

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

198 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to stack(Sort?) objects (Trees in this case) in unity 2D TileMap 1 Answer

2D graphic problem with tilemap and resolution 0 Answers

Tile can't snap to another tile in tileset 1 Answer

How can i have my character be hidden behind tilemap walls? 0 Answers

2D isotiles. How to create the visual effect of walking up a ramp or a slope??? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges