Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Resolved Targets incorrectly shared by separate constraints?

Discussion in 'Animation Rigging' started by daniel_lochner, Feb 25, 2021.

  1. daniel_lochner

    daniel_lochner

    Joined:
    Jun 9, 2016
    Posts:
    175
    Hi there,

    For some reason, targets are incorrectly shared by separate constraints, allowing me to manipulate the same limb by moving different targets?


    Here is a video showing the structure of my animation rig:


    I found that this could be partially solved for a basic pre-made humanoid rig by naming constraint game objects differently (see this forum thread I posted recently). In my case however, the actual skeleton of the character is procedurally generated at runtime. Would this be an issue?

    Here is my current procedure for the
    TwoBoneIKConstraint
    as an example:
    1. Create a
      GameObject
      named “Limb_X”, as well as another named “Target”, which is a child of it.
    2. Add a
      TwoBoneIKConstraint
      to “Limb_X”, and
      Reset()
      it to initialize default values.
    3. Assign values to all of its data (i.e. root, mid, tip and target).
    4. Rebuild the rig (e.g.
      rigBuilder.Build()
      ) and rebind the animator (e.g.
      animator.Rebind()
      ) in that order.
    Is this a bug?

    Thanks!
     
    Last edited: Feb 27, 2021