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.