- Home /
Small objects don't collide
I have simple scene with two boxes. I assign rigid body and and box colliders, make one box freezed by rotation and position.
When my objects is about 30m in size collide occurs, but physics slow. My real object is 10cm in size and when i make this size, and actual mass, then one box fall through other.
I tried mesh collider with convex, but problem still persists.
This is a rough answer, but physics is better off set up using relative masses and sizes, not actual sizes. I found this when trying to make a pinball table. So if you have a person and a bus, you wouldnt put the person mass at 90 and the bus mass at 100000(?), but rather the person at 1 and the bus at a max 100. So decide on the object that all other objects will be scaled from, and use relative mass and size from there.
There are also work-arounds like raycasting : http://wiki.unity3d.com/index.php?title=DontGoThroughThings
Answer by ThePunisher · Nov 27, 2012 at 09:04 PM
alucardj has a good point. You're going to have a lot of trouble using small objects like that with the physics engine.
Start with one of the smallest objects you have and make that have a scale of 1 then scale everything else relative to it just like alucardj said. You have to be careful of the other extreme too though, making physics objects too large will bog down your game.
If you can't do that for whatever reason you can always change the Collision Detection on your RigidBody component to Continuous Dynamic. This will be more intensive however, and I wouldn't recommend it for more than a handful of objects.