Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Johnnemann · Mar 18, 2013 at 04:27 AM · rigidbodyinertiatensor

How can I detect Actors which will cause the "Compute mesh inertia tensor failed!" error?

Our project has a few of these: Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes! Please change mesh geometry or supply a tensor manually!

I've read various threads, like this one: http://forum.unity3d.com/threads/8342-Error-unknown-from-quot-Actor-updateMassFromShapes-quot

Or this: http://answers.unity3d.com/questions/7841/what-does-the-compute-mesh-inertia-tensor-failed-e.html

...which discuss how to fix the problem. However, I can't even locate the objects generating the error (we have thousands of objects in our scene).

I'm trying to write an Editor script which will detect objects with the properties that trigger this, but no matter what I try I still get the error.

I've tried: MeshColliders with a mesh where extents are 0 in one dimension, MeshColliders lacking a mesh, non-convex MeshColliders with a RigidBody attached, MeshColliders with RigidBodies that have an inertia tensor of magnitude 0, and RigidBodies that have inertia tensors of 1.0 in all dimensions (it seemed like MeshColliders with missing meshes generated (1, 1, 1) inertia tensors, so I thought that might be the default).

Anyone have any more suggestions for me?

Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ivarboms · Mar 18, 2013 at 08:50 AM

I believe this is typically caused by rigid bodies with mesh colliders whose extents in any axis is 0, or some other exceptional geometry which makes PhysX unable to calculate the inertia tensor automatically. This error is reproducible by creating a standard Unity plane, and then adding a rigid body to it.

The most likely case is that you have some rigid bodies with plane mesh colliders.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Johnnemann · Mar 18, 2013 at 10:01 PM 0
Share

Yeah, that's what I assumed, too, but detecting $$anonymous$$eshCollider.shared$$anonymous$$esh.bounds.extents of zero didn't find the offending objects. Is there some other property I should be checking?

avatar image ivarboms · Mar 18, 2013 at 10:38 PM 0
Share

Checking the extents might not work in cases where for instance you have a plane mesh which is not axis aligned, meaning the bounds will not be zero. One solution could be calculating the smallest bounding box of all the meshes used for colliders, and then looking at the extents of those bounding boxes. I'm sure there's a better way to do this too, but that's the first way I could think of.

Another possibility could be simply finding $$anonymous$$eshCollider.shared$$anonymous$$eshes whose name contains "plane", might get you some results if you're lucky.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Wierd Internal Physics problem 1 Answer

Excluding a collider from tensor calculations? 0 Answers

Disable inertia tensor calculations on rigidbody? 0 Answers

How do I programmatically Combine Inertia Tensors? 2 Answers

Inertia around axis 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges