Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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:
    170
    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