- Home /
Box collider fell "inside" into another one (Collision)
I've the following environment:
- Floor -- it is a cube scale by (10, 0.2, 10). Box Collider Material = wood
- Tiny Box -- it is a cube scale by (0.02, 0.05, 0.01). Box Collider Material = wood. I added RigidBody
- The tiny box is on top of the floor
- Apply rigidbody.AddForce(90, 0, 0) to the tiny box. The tiny box falls down as expected.
However, about half of the tiny box body fell "inside" the floor. I was expecting the tiny box is (fully) on top of the floor.
What did I do wrong?
Thanks in advance for your help.
Answer by testure · Jul 28, 2011 at 02:32 AM
Here go go, enjoy:
http://www.unifycommunity.com/wiki/index.php?title=DontGoThroughThings
Does that work, I've tried it but it had no effect. $$anonymous$$aybe I did it wrong...
I just tried the http://www.unifycommunity.com/wiki/index.php?title=DontGoThroughThings. Unfortunately, it didn't work for me.
Answer by pion · Jul 28, 2011 at 03:22 AM
I've just found out this discussion Collision - Issues of Scale....
Per suggestions on the above discussion, I did the following:
- Go to Edit > Project Settings > Physics
- Change the Min Penetration For Penalty from 0.01 to 0.001
It seems that it solves my problem.
Answer by Astraeus · Jul 28, 2011 at 01:26 AM
Honestly, I found this is just a natural function of Unity's physics that I try my best to cover up. On the floor change the collision detection in the rigidbody to "Continuous" and the one in the box to "Dynamic Continuous." This probably won't do much. You can also just scale the whole scene up, I've found that helps, and adding mass to the floor. I don't really know, as I too am starting in Unity so there may be a solution I don't know about.
Your answer
![](https://koobas.hobune.stream/wayback/20220612160816im_/https://answers.unity.com/themes/thub/images/avi.jpg)