Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 /
  • Help Room /
avatar image
0
Question by steventhurgood · Dec 28, 2021 at 09:39 PM · isometric

Where to set the pivots on tiles and players for an Isometric ZasY tilemap.

I am trying to create an Isometric level such that the player can move around it and go behind objects that have higher Z values, using a ZasY tilemap.

I am creating the tiles as cube shapes, and setting the Pivot to the center:

https://prnt.sc/2504q7s

The intention is that this is a floor tile, and the player would walk on the top face. As such, I had to set the tilemap anchor points to 0,0,0 in the world, and also edit the tile palette prefab asset to set the grid anchor to 0,0,0, such that my tiles aligned correctly with the grid.

I have a simple player sprite, with a pivot at the bottom, and I have that sprite set to sort by pivot:

https://prnt.sc/25053cd

My transparency sort axis is set to custom: 0, 1, -0.26. Tilemap mode is "individual"

With my tilemap at z=0, and my player at z=2, things look to be correct:

https://prnt.sc/2505hn4

Things start to fall apparent when I add a second layer, however. In this example, I've got a second layer of cube tiles at z=2, in orange:

https://prnt.sc/2505ly6

Because the orange cubes and the player are both at z=2, only the Y position of the pivot (afaik) is used to determine the sort order.

If the bottom of the player shadow is below the centre of the cube, it renders in front of the cube, even though it is technically behind it:

https://prnt.sc/2505r82

If I try and do it the other way around, so that the cube appears above the tile (with custom pivot y=0.25) then even the z=0 cubes occasionally render in front of my z=2 player:

https://prnt.sc/2508r5y

So I'm at a loss. I've looked at how the example code in the 2d techdemos does it: that has the pivot at the centre, which is the front of the top face of the cube, but even that doesn't seem to work correctly:

https://prnt.sc/2509c9v

So at this point I'm at a bit of a loss. This seems to be a pretty straightforward use case, as far as I can tell, but I'm not sure what I'm doing wrong.

Any pointers? How should I create my sprites (flat and raised) for isometric tiles? What should the pivot points be? What about the anchor points for the tilemap, so that tiles line up correctly with the grid?

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

0 Replies

· Add your reply
  • Sort: 

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

175 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

Related Questions

how can I make an orthographic isometric pixel game? Please Help< 1 Answer

Isometric Tiles Inaccurate Pixels Upon Import 0 Answers

Using stairs in 3D grid-based pathfinding (A*)? 0 Answers

Isometric sprite shadows mapping 0 Answers

Change transparent mesh renderer sort point 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