• 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 Votbear · Jul 27, 2015 at 09:38 PM · collisionphysicsrigidbodycollider

Removing bump when going through two adjacent colliders

Hello,

I'm a newbie in unity, and had only finished the roll-a-ball tutorial a few days ago. To challenge myself, I wanted to expand the game into a 3d platformer-esque game, creating a "level" out of 3d cubes and other objects

However, i noticed that sometimes, when the player ball goes through two perfectly adjacent colliders, a small 'bump' up may still occur.

alt text

Several search attempts has shown that this is a pretty common problem regarding ghost vertices, but I've yet to find a single working solution. I don't think a charactercontroller will work for such a physics-reliant minigame, and some other solutions that involve editing "Min penetration for penalty" to 0 no longer work since in unity 5 it has been changed to default contact offset (which has to be strictly positive, apparently).

Some other solutions involve replacing everything with a single solid collider, but as you can see from the screenshot its not really feasible (plus it's not really the most elegant of solutions either)

Alternative solutions and help will be much appreciated, thank you in advance!

new-canvas.png (34.2 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 zach-r-d · Jul 27, 2015 at 10:05 PM 1
Share

There may be hacks that will lessen the problem, but having a single collider is the only 100% for-sure solution. Unfortunately, it's simply a limitation of most real-time physics engines.

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer Wiki

Answer by Votbear · Jul 28, 2015 at 03:48 AM

I think I found a pretty acceptable fix! In Unity 5, reducing Min penetration for penalty to 0 in Settings->Physics no longer work since its replacement, Default contact offset has to be strictly positive. It's still possible, however, to use an extremely small number (i used 1e-7) to apparently emulate the same results.

It might not be a perfect solution, but I believe it has mitigated the chances of the problem ocurring significantly

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

Answer by Topillogical · Aug 29, 2017 at 08:10 PM

I also had this problem, and none of the suggestions worked from here. However, setting collision detection to Discrete (the default) on the player's RigidBody (using a spherical collider) solved this for me. I believe that with Continuous Collision Detection, Unity's secret physics system was registering 2 or more simultaneous collisions, and this was causing my player to get stuck.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

OnCollisionEnter: collision.gameObject has weird behaviour 0 Answers

Is it possible to tell Unity physics to ignore a collision at collision time? 1 Answer

Excluding some physics collisions 3 Answers

Detecting When Intersection Penalty is Being Applied 2 Answers

Do you have to have a rigidbody component for collision detection? 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