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
1
Question by Xmann1 · Jun 26, 2018 at 05:53 AM · 2dcollider2dtilemap2d physics

Tilemap Colliders not working with custom tile

I have a simple scene with a player with gravity and a tilemap with a tilemap collider. I also have a custom Tile named ground. The colliders on the ground seems to not work! I also can't see a green outline in the editor, so i think the issue is with the tiles themselves.

screenshot-1.png (9.9 kB)
screenshot-2.png (21.1 kB)
Comment
Add comment · Show 2
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 phoenixarka · Dec 04, 2018 at 03:14 AM 0
Share

I have EXACTLY SA$$anonymous$$E problem you have. Can anyone help us?

Thanks

avatar image sonolil · Apr 13, 2021 at 03:20 PM 0
Share

LOL and then there is me who just yeeted my Tilemap Collider 2D sometime in the past. In hindsight I think I did it to avoid a AABB error hell but whatever

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by leonieponsioen · Jun 21, 2019 at 11:40 PM

I've had this problem, I extended the Tile class for my custom tile and overriden the GetTileData function. I forgot t o call the base function, after doing so it works

 public override void GetTileData(Vector3Int location, ITilemap tilemap, ref TileData tileData)
  {
         base.GetTileData(location, tilemap, ref tileData);
         /// rest of your code
   }

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 vn_man · Aug 03, 2019 at 07:45 AM 0
Share

wonderful!!!

avatar image Kreata · Feb 08, 2020 at 11:53 AM 0
Share

This was the problem. Thank you!

avatar image
0

Answer by EvasiveBastrd · Jan 29, 2019 at 03:06 AM

I think there is a bug. After adding the Tilemap Collider2d I had to change the rendering layer of the tilemap, I was then able to switch it back to my original setting and it worked like a charm.

If anyone else experiences this and they know how to file a bug report please do, I would but I'm still not sure I had nothing to do with my issue.

@Xmann1 @phoenixarka

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 Siggytron · Feb 19, 2019 at 04:58 AM 0
Share

I have both of my tilemaps set to Order in layer: 0, and Sorting layer: default. The object has a rigidbody and same order in layer and sorting layer and it's just falling right through. Did you just randomly change the order in layer on your renderer? Or the sorting layer? Did you save and close and reopen? I changed all kinds of layer numbers and it doesn't seem to be fixing my issue.

avatar image EvasiveBastrd Siggytron · Feb 19, 2019 at 05:22 AM 0
Share

Yes, all I did was change the sorting layer then I set it back to default. If you can see the green collision shapes then make sure your collides aren't set to 'Is Trigger', also check your collision layers in the project settings. Other than that I can't really help for I'm a noob at Uinty.

Good luck and don't give up. It's midnight here, tomorrow I will try to recreate the scenario and try to confirm a solution.

avatar image
0

Answer by ryanlin138 · Mar 05, 2020 at 01:09 AM

I had this problem and fixed it by setting the collider type. (I'm extending TileBase, not Tile)

tileData.colliderType = Tile.ColliderType.Sprite;

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

241 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image 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

Ignore collisions with water if ground above water 0 Answers

Rotate tilemap collider -1 Answers

2d Tilemap collidor not working 0 Answers

Player slips through the tilemap collider 2D. 0 Answers

Rule Tiles across different (ground/!ground) tilemaps 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