Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by nospoone · Aug 12, 2014 at 03:51 PM · 2dcollision2d-physics

2D Colliders are colliding but not touching

I've been trying to switch from a custom raycast physics system to one driven by Box2D and I'm stumped by this problem:

Collision Problem (with Edge Collider 2D) Collision Problem (with Box Collider 2D)

They seemingly collide, but leave a rather huge gap between each other. The sprite is using a Box Collider. In the first image the "floor" is using an Edge Collider 2D (as proposed here) and the second one is using a Box Collider 2D.

I played with a bunch of different settings and colliders and can't seem to resolve the issue!

Thanks!

collision2.jpg (11.5 kB)
collision1.jpg (16.3 kB)
Comment
Add comment · Show 5
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 Steel_Arm · Aug 12, 2014 at 05:27 PM 0
Share

Are you using a rigidbody on either object?

avatar image Steel_Arm · Aug 12, 2014 at 05:47 PM 0
Share

Also, what scale are you using? If you're using a small enough scale, this will happen. Based on the size of that gap, I'm guessing your box collider's scale is about 0.25. You may need to just scale up the size of your scene.

avatar image Rincew1nd · Aug 12, 2014 at 06:25 PM 0
Share

I have almost same problem. I just wanna to ask about it and find your post) http://i.imgur.com/zJ0C8it.png http://i.imgur.com/fgUlG$$anonymous$$d.png 1 - box collider http://i.imgur.com/k07eJNc.png 4 - character http://i.imgur.com/WrHWdOw.png

https://github.com/rincew1nd/Sleepy-mole/blob/master/Assets/Scripts/character_controller.cs

avatar image nospoone · Aug 12, 2014 at 07:06 PM 0
Share

EDIT: Sure enough, changing the scale worked. Can you post your comment as an answer so I can accept it? Thanks :D

Only the player has a Rigidbody2D attached. The collider size of the player is indeed around 0.25 but when I bump it up (to 1) it has see$$anonymous$$gly no effect...

I will try to scale up the whole thing and report back.

2014-08-12 15-05-32.jpg (37.2 kB)
avatar image aaonurdemir · May 27, 2016 at 02:55 PM 0
Share

Also it's happening to polygon collider which does not have scale.

1 Reply

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

Answer by nospoone · Aug 17, 2014 at 04:16 AM

Reposting Steel_Arm's answer as he isn't:

Also, what scale are you using? If you're using a small enough scale, this will happen. Based on the size of that gap, I'm guessing your box collider's scale is about 0.25. You may need to just scale up the size of your scene.

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

6 People are following this question.

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

Related Questions

Creating 'redstone' like wires 1 Answer

How to make a little wiggle room for the collision? 1 Answer

Different platform effector 2d rotations for different colliders 1 Answer

Collision matrix not working with kinematic rigidbodies,Kinematic rigidbodies still colliding even though disabled in matrix 1 Answer

Unity 2D Collider Safe Sizes 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