Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Child nodes off RigidBody

Discussion in 'Physics' started by kaffiene, Jul 20, 2018.

  1. kaffiene


    May 26, 2013
    Hi All

    I 'm getting this error (using 2018.2.0f2):

    "Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5.
    If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component."

    What I'm doing is knocking over a tree model. It's laid out like this:

    tree (empty)
    |__ trunk (rigid body, capsule collider)
    |__ Cone meshes for foliage

    I set the rigid body to IsKinematic until such time as I want to apply a force to the tree (knock it over). That works absolutely the way I want it to, visually at least, but I get the error above. I'm not sure why it thinks I want a non-convex collider - does it assume that the code child nodes are part of the collider?
    Is there an issue with me parenting the cone/foliage to the trunk with the rigid body? If this isn't the right way to do this, what is?

    To recap: I'm happy for the physics to just be on the trunk - the foliage intersects the ground when it lands and then I fade it out. But I want the foliage parented to the trunk so it all falls together.

    Any help would be appreciated!

    Last edited: Jul 21, 2018
  2. Edy


    Jun 3, 2010
    Yes, of course. Any collider in the same GameObject of a Rigidbody or any of its children will be considered part of the Rigidbody's collider. All these colliders must be either primitive colliders (sphere, box, capsule) or convex mesh-collider.

    The most probable solution is just ticking the "Convex" flag in the cone colliders.
  3. kaffiene


    May 26, 2013
    Thanks for that. I don't want the cones included in the collider - but your post pointed me in the right direction. I hadn't noticed that the cones had colliders on them at all. Removing them gave me the result I was looking for. Thanks for your help! :)
    Edy likes this.