Hi, long story short, I have a mesh collider for some objects, and i am “hurling” a sphere with rigidbody and sphere collider at my object with mesh collider. The problem is that, sometimes the ball just goes through my mesh collider like a ghost, while most of the time it works.
1 Answer
1This is a common problem with mesh colliders.
You can try the following…
1.) Change your meshes to use box colliders
2.) Increase the overall scale of your scene
3.) You can try increasing the solver iteration count, and playing with the physics settings n the Physics Manager.
4.) Attach this script to your ball.
My personal choice from previous experience, use #4, and #1 if possible. 2 and 3 may help but the script works pretty well.
Link to script is no longer valid.
– Fowlski77(found via Google) I don't have enough rep to suggest edits etc, but here's an updated link to the wiki in #4 above: http://wiki.unity3d.com/index.php?title=DontGoThroughThings
– MysterAitchI have updated the link, thank you.
– MeltdownThanks! was pulling my hair out over this. Method #1 worked for me :)
– thunderdev321