- Home /
[Closed]Objects fall through the ground
I have a map with a Mesh Collider and Grenades with Mesh Collider and Rigidbody but i also tried Sphere collider.Whith both it happens very often when i trow a grenade to the ground, it goes right through it. Sorry for my bad English .
recheck your colliders, make sure they are set properly, read this, manual for mesh collider by Unity
Its just a $$anonymous$$eshcollider with Default settings and a Rigidbody, same settings as every other mesh collider.
Answer by MKayJay · Jul 06, 2014 at 03:48 PM
If you object is scaled down a lot it can be a problem. If for example your scale is something like 0.05 on at least one axis, the numbers may get too small for unity to calculate collisions properly. I'd suggest to reduce the size in the import settings, or make it smaller in your model program (if any), and then scale it up. In my experience a scale of 1, 1, 1 gives the least trouble.
Answer by Kiwasi · Jul 06, 2014 at 10:08 AM
Mesh colliders won't collide with each other by default unless you put one of them as convex.
I have no idea what convex means or the performance implications of convex. But that will solve your problem.
As stated : Usually, two $$anonymous$$esh Colliders cannot collide with each other. Upvoted.
Also consider changing the Collision Detection setting of the rigidbody to Continuous Dynamic
For something temporary like a grenade, I strongly suggest just using a sphere or capsule collider.
I changed to Convex and to Continuos Dynamic, but i can still throw the grenade through the ground, but onlylike 10 percent of the grenades goes like that. Sorry again for my English.
Answer by DoctorWho · Jul 06, 2014 at 04:17 AM
Check to make sure it is not set to trigger, or it will pass right threw things, if you need it to be a trigger then you can have 2 different colliders just make sure the trigger is slightly bigger then the other. That is what has worked for me, I am sure their is other ways, by making constraints in code, but I think simple could be better in this case.
http://docs.unity3d.com/ScriptReference/Collision-contacts.html
It is not set Trigger and i don't even need a Trigger, its just a $$anonymous$$eshcollider with Default settings and a Rigidbody.