Error unknown from "Actor::updateMassFromShapes"..

Hi there!
I’m having this error:

I have no idea what is it or where is this happening. But with this problem I can’t even start my game.

TXS n [ ]s Chips

I’ve seen an error something like that when trying to use a rigidbody with a mesh collider that isn’t closed.

–Eric

Yes, I’m using dozens of mesh colliders with rigidbody, but it wasn’t givin’ me any problem till now…

Does anyone know if it is a wrong thing to be done?

[ ]s Chips

What are you trying to do?

I built a door that cracks and blow in pices when you hit a trigger in frnt of it. So I’ve made all of it’s pices a rigidbody with kinematic. When the trigger is activated the pices were thrown away with addForce and addTorque.

		rigidbody.isKinematic = false;
		rigidbody.AddForce(Vector3(0, Random.Range(0,5), Random.Range(0,5)),ForceMode.Impulse);
		yield WaitForSeconds(0.3);
		rigidbody.AddTorque ( 0.5, 1, 0.3, ForceMode.Impulse );

but the thing is that is hasn’t worked in a very specific door (witch cracks in two diferente times) and the other tipes ware working fine.

[ ]s Chips

So… Anyone have another tip 4 me? I’m still having this problem. :frowning:
And I’m not planning to destroy my door…

[ ]s Chips

As I understand it, the method of calculating the tensor of inertia would be messed up if there were gaps in the mesh (there should be a better error message, though!) If it is possible to use closed meshes then it will likely fix the problem.

However, you can also set the tensor from a script using the Rigidbody.inertiaTensor property. The docs suggest that the physics engine won’t try to calculate the tensor if you set it yourself, and therefore the error shouldn’t occur.

As for the value of the tensor, it’s a bit complicated to estimate it accurately, but you can get a reasonable result with trial and error. Basically, it is the degree to which the object resists being turned around each axis. If you think of a broom handle, it takes less effort to roll it between your fingers than it does to twirl it around its centre. If a broom handle object’s mesh had its length lying along the z-axis then it would be easy to roll around this axis (low tensor z value) than around the x and y (higher values).