Author Topic: Compute mesh inertia tensor failed with AddChild  (Read 2079 times)

vikti

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 25
    • View Profile
Compute mesh inertia tensor failed with AddChild
« on: February 11, 2015, 05:42:42 PM »
I have some exceptions that I don't understand.

  1. Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes! Please change mesh geometry or supply a tensor manually!
  2.  

This is thrown by :

  1. MapUIRoot = Resources.Load("Components/com_map/Views/Templates/_mapUIRoot") as GameObject;
  2. GameObject MapLayer  = Resources.Load("Components/com_map/Views/Templates/_mapLayer") as GameObject;
  3.  
  4. MapLayer = NGUITools.AddChild(gameObject,MapLayer);

How can I solve this ?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Compute mesh inertia tensor failed with AddChild
« Reply #1 on: February 11, 2015, 09:39:47 PM »
Sounds like you have an object there that uses a custom mesh collider that is not fully enclosed. Stick to non-mesh colliders.

vikti

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Compute mesh inertia tensor failed with AddChild
« Reply #2 on: February 12, 2015, 04:36:50 AM »
It was due to the fact that I parent a non NGUI object (it is a OnlineMaps plugin, which display a googlemap) which does not like at all the scale manipulations.
I solve the probleme by parent it outside the actual UIRoot.
Thx