Yep, another MeshCollider issue post. I’m using Unity3D v3.3.0f4
I have a cannonball fired from a cannon. It has a SphereCollider and a Rigidbody with a mass and uses gravity, nothing out of the ordinary, and I move it using physics. When it hits the ground (a CubeCollider) it explodes through OnCollisionEnter.
However, there are some rock formation models that are static and have a MeshCollider. The cannonballs sometimes explode when they hit these models, but mostly they just bounce off, hit the ground and then explode. So my reasoning is that the collision IS detected; it just bounced the ball off of the MeshCollider, right? However the Cannonball script never gets any notice of this event. I’ve tried every OnCollisionXXX and OnTriggerXXX event, but none fire.
I’ve just spent many hours on the forum, searching for solutions or tips.
- Adding a kinematic Rigidbody to the rock doesn’t work.
- Setting the MeshCollider to convex doesn’t do anything.
- Decreasing the FixedUpdate time doesn’t help.
What else can I do?
And why does the cannonball bounce off the MeshCollider but doesn’t fire off an event?
Thanks in advance