Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Bind GameObject to Skinned Mesh Renderer

Discussion in 'Animation' started by imaewyn, Aug 3, 2023.

  1. imaewyn

    imaewyn

    Joined:
    Apr 23, 2016
    Posts:
    207
    Hello. I have 3D model with animations and skinned mesh renderer. This model has no hierarhy with bones, so I can't place any sword as child for hand bone. Is any way to attach objects to hand in this or simillar cases?
     
  2. tsukimi

    tsukimi

    Joined:
    Dec 10, 2014
    Posts:
    50
    There should be an option to expose the bones; did you turned on the Optimize Game Object? If so, you can select which bone to expose, or just turn it off to expose all the bones. (See Model Settings > Rig Tab)
     
    imaewyn likes this.
  3. imaewyn

    imaewyn

    Joined:
    Apr 23, 2016
    Posts:
    207
    Ok, Thank you. That's a good idea, now I see bones. But what if the object which I want to bind has Mesh Skin Renderer instead Mesh Renderer and set perent for it haven't result. How I can change transform position and rotation relative to parent bone for this?
     
  4. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    105
    Every bone is a GameObject/Transform, and is updated every frame with played Animation, so if you set your sword as a child of the hand bone's transform, it will start follow the movement of the model's hand.