Supplying a tensor manually

This error has been haunting me for some time, and no one has been able to help.

Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes! Please change mesh geometry or supply a tensor manually!
UnityEngine.MeshCollider:set_sharedMesh(Mesh)

I know why this error is happening. Here is an easy to follow bullet points on why certain “solutions” don’t work.

  • I can’t change the collider to a box collider. The collision has to be triangle perfect.
  • We don’t have control over all the meshes, so this can’t be solved by fixing the meshes
  • The rigid body is kinematic. Yet this issue doesn’t go away.
  • What does “supply a tensor manually” mean if the code below before the line that is throwing this error doesn’t solve the issue?? How/where am I suppose to supply a tensor manually?
//Where meshRigidBody is the rigid body of the object with the mesh collider
meshRigidBody.inertiaTensor = Vector3.zero;
meshRigidBody.inertiaTensorRotation = Quaternion.identity;

How do I solve this issue?

For the love of all that is the internet, someone help me out! We have spent nearly 10K on Unity licenses, yet we can’t find an answer to this question. Help would be greatly appreciated.

This came up in a recent thread. I believe the reason was attempting to attach a meshcollider on an zero geometry object (possibly an empty gameobject?)

The issue is because the rigid body is trying to calculate the tensor for a mesh collider that is so small, it can’t calculate the volume. We do not have complete control over what models get put into our system, so we can’t fix this by doing anything with the model. But since we don’t even need the tensor information, but we need a rigid body for whatever the reason was (I think it helps with some animation physics), we want to supply it manually. But that doesn’t work… (Or I am doing it wrong)

Im trying to do the same thing. Did you ever solve this problem?