Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Make it possible to animate the parent-child relationship of child transform under the Animator

Discussion in 'Animation' started by Xarbrough, Jun 19, 2019.

  1. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    The animators in my team regularly ask for this feature and everytime we have to implement a custom workaround, which often causes other issues. We would simply like to change the parent a child is attached to in a Unity animation.

    Of course, it is only possible to animate GameObjects that are children of the Animator component because of the way Unity animations look up the Transforms by name, but this limitation would be ok if we could still change one of the child Transform so that is is attached to a different child. For example, when animating a character who holds an item in his hand, it would be helpful if we could attach the item to his right hand, then to his left and finally to his backpack. Especially when working in 2D this is important because it simplifies things such as working with SortingGroups (layers and sorting order within the animated character).

    This is also helpful for other systems which check for objects within a certain part of the transform hierarchy while the animation is playing, so the transform parent relationship can be important even if the item position is constantly controlled by the animation. Finally, it would remove the necessity of using animation events for many gameplay use-cases, where it would be enough to simply detach an item.
     
    Julian_Nementic likes this.
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,542
    I believe this is possible with the Animation Rigging preview package (haven't used it myself though).
     
    Xarbrough likes this.