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 /
  • Help Room /
avatar image
0
Question by Pilessio · Jul 01, 2019 at 03:15 PM · 2d-platformercolliderstilemaptilesplatforms

Problems with tilemaps of Unity 2d-extras

Hi folks

idea is this -> in-game

Sprites are available here: sprites

As you can see it's a simple tilemap with grid colliders (not sprite colliders) that simulates depth having sprites greater than tile grids. Image explain better thank my words.

My settings:

Unity version: = 2019.1.7f1 Package used: = Unity-Technology/2D-extras My sprites used by tiles = https://www.piskelapp.com/user/6340638603739136/public PixelToUnits = 500 Tilemap grid = 0.256 x 0.256 Tile palette grid = 0.256 x 0.256 Anchors = 0.5 x, 0.5 y Colliders type = grid Sprites dimension = 128 x 128, 128 x 256, 256 x 256 Pivot of each sprite imported = {floor_left : (x : 0.75, y : 0.25), floor right : (x : 0.25, y : 0.25), new_ground : center, floor1 : (x : 0.5, y : 0.25)}

As you can see all calculations are correct, based on my pixel per units import.

Problem is that composite collider that use tilemap collider doesn't properly work because, as you can see in image, tile colliders are not merged. They are merged only if I decrease grid dimension from 0.256 to 0.25, but if I do so, images are obviously not correct with tiles.

Tried to decrease composite collider vertex and offset distance but this doesn't resolve problems.

In addition to this, I noticed another issue: if you zoom wth camera sprite in tiles are slightly detached (image here: https://ibb.co/bFmMvK1).

I'm struggling some days, but I can't figure out where I'm wrong.

To reproduce:

  1. import sprites with ppu as 500

  2. Set pivot of each sprite like I described above {floor_left : (x : 0.75, y : 0.25), floor right : (x : 0.25, y : 0.25), new_ground : center, floor1 : (x : 0.5, y : 0.25)}

  3. Import unity 2d extras (download from here and move to your project's "Assets" folder)

  4. Create tilemap and tile palette with grid of 0.256 for both x and y and set ad tilemap your active tilemap

  5. Add sprites to your tile palette and for created tiles set collider type as grid (not as sprite)

  6. Add a tilemap collider to your tilemap, make it used by composite and add a composite collider too

Please help me.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Pilessio · Jul 03, 2019 at 12:31 PM

Resolved increasing property "Extrusion factor" "TilemapCollider2D".

You have to delete every ile you painted in tilemap, increase this value from 1e-05 to 1e-03 and repaint you tiles. Now composite collider will work.

Comment
Add comment · 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

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

191 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

Related Questions

Using a Tilemap Collider 2D, and my rigidbodies keep getting stuck inbetween tiles. Is manually placing Edge Collider 2Ds my only solution? 1 Answer

Weird Tilemap gap bug, what can I do to hide it? 1 Answer

Black Line Above my Tiles 0 Answers

How to display a huge image in 2D scene? 1 Answer

Solution for a Tiles Instantiated Object not appearing on Tile Palette? 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