Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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 /
avatar image
1
Question by Grapphinos · Mar 29, 2018 at 05:26 AM · collisionphysics2dtilemapplatformercollider 2d

Tilemap Collider/Composite Collider leaving gaps

Hi all,

I've tried searching around for other people who've had this problem, but I couldn't find anything. I'm happy to be pointed to existing answers though.

Essentially I'm working on a 2D platformer. I have a tilemap palette based on a sprite sheet, and I've created their physics shapes in the sprite editor. I'm using this for placeholder art for my environments. This tilemap layer has a Tilemap Collider 2D attached, which uses a Composite Collider 2D which uses a Platform Effector 2D.

I didn't have any issues initially making changes or anything else. Today however, after editing the map a little bit, my tiles aren't joining together properly. The colliders still exists, but the problem is that I want my player to be able to pass through these particular objects from below and the sides. I feel that the Platform Effector 2D should make this a non issue, but my character is colliding with the tiles below these gaps as if they're normal colliders.

If you need any more information or screenshots, please ask.

Thanks!

examples.png (15.6 kB)
settings.png (47.4 kB)
Comment
Add comment · Show 1
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 Grapphinos · Mar 29, 2018 at 11:00 PM 0
Share

Oh! I'm half an idiot. If my player only needs to interact with the top of the box, the sides are pointless. I can just remove them and it becomes a non-issue.

I'm still curious as to the behaviour of the Composite Collider 2D though if anyone can enlighten me.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Seabat10 · Apr 12, 2020 at 08:27 PM

I have found a solution, in the tilemap collider check the "Used by Composite", that fixed it to me. Anyways, to be sure that this is not going to happen again, I changed my character box collider to a capsule collider, a little jump is better than be stuck

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 GutierManu · 12 hours ago 0
Share

I didn't have any "jump" issues by applying this solution, but I noticed my player's velocity on the x axis kept a value, even if there were no inputs to move it (and no apparent movement). Setting the offset distance to 0 helped me solve this issue.

avatar image
0

Answer by nickculbertson · Mar 29, 2018 at 01:24 PM

I think the current solution is to add a pixel layer around each of your sprites in the sprite sheet: https://www.youtube.com/watch?v=QW53YIjhQsA

Comment
Add comment · Show 3 · 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 Grapphinos · Mar 29, 2018 at 10:50 PM 0
Share

This is a good solution for graphical problems with tilemaps, so I thank you for that. I probably wasn't clear enough though that my issue is more to do with the collider. The lines I've circled in the first image are (apparently) random points where the composite collider 2d isn't joining together two tiles, creating a small platform that is bugging my player out. I can probably upload a gif of the behaviour it creates later today. Thanks for your answer, though, really :)

avatar image jaehkorea Grapphinos · Jun 20, 2018 at 05:59 AM 0
Share

Have you found solution for this? I just made placeholder like you did for starter and tried out and it's doing that weird thing that character just slips through the tile even though I had collider even overlapping each other. I have no clue.

avatar image theoyoshimura jaehkorea · Feb 09, 2020 at 02:28 AM 0
Share

I know this topic is very old, but I found myself having the same problem. I'm working on a topdown shooter with composite colliders for walls, but every now and then my character just slips through the wall with no gaps on the colliders whatsoever. Does anyone know the fix?

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

132 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

Related Questions

Jump implementation in multi level platforms game 1 Answer

Rigidbody2D Player collider seems larger than displayed 0 Answers

Physics2D.OverlapBox not working as expected. 1 Answer

Solutions for isometric collision 1 Answer

Object scale effects to speed 1 Answer


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