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 robhuhn · Feb 14, 2013 at 09:24 AM · physicscolliderintersection

Prevent collider intersection

Hi, I'm just having an issue with colliders at a very small size which are intersecting each other at no velocity.

I set up a few cubes with scale 0.1 and froze the position on Z - rotation on XY (like there is no third dimension). My gravity is set to -0.81 so there is not much pressure on the cubes.

When testing the scene all colliders of the cubes will intersect (image attached).

Is there a way to prevent this behavior? I would need them to collide very clean, but sizing them up also affects other physical properties so thats not what I want.

alt text

screen shot 2013-02-14 at 09.05.17.png (51.8 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 robhuhn · Feb 14, 2013 at 10:17 AM 0
Share

I set it from 0.01 to 0.001 and it looks much better now, thanks! Do you know something about how this affects performance?

Would you turn your comment into an answer so I can mark it?

alt text

screen shot 2013-02-14 at 11.11.08.png (45.6 kB)

2 Replies

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

Answer by Matthew A · Feb 14, 2013 at 10:03 AM

I guess it's because of the min penetration setting: http://docs.unity3d.com/Documentation/ScriptReference/Physics-minPenetrationForPenalty.html

I'm afraid I don't know how this affects performance though.

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
1

Answer by MadDave · Feb 14, 2013 at 10:48 AM

Physics engines need to allow some small penetrations, otherwise the system would never come to rest (i.e. stop moving).
You can tweak some parameters of the physics system and see if that helps (Edit - Project Settings - Physics). Try reducing the Minimum Penetration for Penalty Force or increasing the iteration count.

However, it is generally difficult to get a "crisp" result from a physics engine. That's just not how physics engines work.

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 robhuhn · Feb 14, 2013 at 11:36 AM 0
Share

Yes still fighting with other properties like scale, time scale, mass and so on. Thanks for your hint that a too small penetration will prevent the bodies from sleeping.

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

11 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

Related Questions

Make object pass through one object and bounce from another 2 Answers

Tree Colliders Not Working With Physics.CheckSphere / Capsule 4 Answers

Sprite does not rotate with a CircleCollider2D 1 Answer

Help with floaty rigidbody physics 1 Answer

overlapsphere to destroy NPCs on exit 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