Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Animation Rigging - is it possible to have world constraints?

Discussion in 'Animation Rigging' started by Setsuki, Sep 22, 2019.

  1. Setsuki

    Setsuki

    Joined:
    Aug 21, 2012
    Posts:
    31
    Hello !
    I have been trying my hand on the Animation Rigging package, and while it's very easy to set up and to understand, there is one issue I seem to be having.

    I will be using the Multi Parent Constraint demo as an example.
    There are three demos in this page of the documentation :
    Original, Parent Switch and Multi-Parent.

    In the Parent Switch video, the parent of the sword changes from the ground, to the hand, and finally, to the back of the character. So it doesn't always belong to the character. It first belongs to the world.

    However, in the Multi-Parent video, as well as the provided example package, the sword requires to be part of the character's rig. Does that mean it's impossible for two characters to share the same sword ? Or for the word to be part of the world, and not the character ?


    Another simple example of this "world constraint" issue would be the target of an IK Constraint, for a hand.
    In the following gif, I will show the difficulty I am encountering of combining at runtime a world object and a Rig, by having the character's hand stay on a Cube that is NOT part of the rig (unlike the sword in the previous example)
    IK World 2.gif

    The expected behaviour being that the hand stays on the cube, no matter how the character, or the cube, moves.
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,

    In your example, the hipsPivot gameObject is not animated, and because of that, it's not in the animation stream used by the constraints. The cube on the other hand is identified as the TwoBoneIK target and is taken into account in the animation stream.

    To get changes to hipsPivot to be considered, add a RigTransform component to the game object.

    For performance reasons, we handle non-animated game objects like that to avoid pulling every game objects in the animation stream.
     
  3. Setsuki

    Setsuki

    Joined:
    Aug 21, 2012
    Posts:
    31
    Hello,

    I did miss this part in the package's documentation. looking again knowing about RigTransform, it does seem to be exactly what I need.
    It indirectly fixes the issue I had with the sword, as well!

    I understand the concern about performance reasons, and, seeing the performances I get with other tools, I appreciate them, as well!