Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Child nodes off RigidBody

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

  1. kaffiene

    kaffiene

    Joined:
    May 26, 2013
    Posts:
    14
    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!

    Peter
     
    Last edited: Jul 21, 2018
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,143
    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

    kaffiene

    Joined:
    May 26, 2013
    Posts:
    14
    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.