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
1
Question by castor · Mar 12, 2013 at 05:06 PM · collisioncollidersscalebox

Collision interpenetrating between 2 meshes

I've been kinda ignoring this problem but now I really need to fix it and can't seem to find the solution anywhere.

I have 2 meshes, both using box colliders and the top one using gravity and no idea why, they always interpenetrate slightly when the simulation starts. I even tried increasing the box size and it kind of helps but it causes other issues with shadows etc.

I'm pretty sure there must be a way for the collision detection to be more precise? Could it be a scale issue?

alt text

collision_issue.jpg (172.1 kB)
Comment
Add comment · Show 6
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 hoy_smallfry · Mar 12, 2013 at 05:25 PM 0
Share

Does your table have a rigidbody, and if so, is it intended to move at all during your scene?

avatar image Loius · Mar 12, 2013 at 05:32 PM 0
Share

Generally, 1unit = 1meter, but if you're working with tiny objects, it's best to scale up (objects and gravity!). Physics does optimizations that tend to mess with them.

avatar image robertbu · Mar 12, 2013 at 06:22 PM 0
Share

Take a look at the Physics $$anonymous$$anager and the "$$anonymous$$in Penetration For Penalty" setting. Edit/Project Settings/Physics. Quoting from the reference:

How deep in meters are two objects allowed to penetrate before the collision solver pushes them apart. A higher value will make objects penetrate more but reduces jitter.

avatar image castor · Mar 12, 2013 at 09:09 PM 0
Share

The table is not supposed to move (and it doesn't have a rigid body attached, just a box collider.)

The scale of the game is currently matching the world scale 1 : 1 and for the Physics I remember playing with it and current its set to a very low value of 0.005.

avatar image castor · Mar 12, 2013 at 11:16 PM 0
Share

Why the suggestion for rigidbody? Would it make a difference? Anything else I could try to fix it? Scaling the world up doesnt sound very good since Im using lightmapping and skeletal animations and they both need proper world scale.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by castor · Mar 22, 2013 at 07:49 PM

Just went extreme and set the "Min Penetration For Penalty" to 0.001 and seems to have worked. Hope there are no issues for the value being so low....

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

12 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

Related Questions

Colliders won't work 0 Answers

Box mechanic: Is it possible to know when the box is closed on all margins? 1 Answer

Speed/trigger only working once 0 Answers

Multiple Stacked Colliders only register for single object 0 Answers

Add Health on Pickup to Decaying Health,Make a collision with an object add health 2 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