Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question Is it possible to duplicate an animated character's movement?

Discussion in 'Animation Rigging' started by FunkyYosh_, Feb 13, 2024.

  1. FunkyYosh_


    Apr 21, 2022
    I have an object called PlayerArmature that has an avatar and animator controller. Its movements get tracked through motion capture when I run the project. What I want to try now is making an exact clone of this object, but without it having the components of the motion capture. Basically, copy the exact movements/animations of the original object at runtime without having to configure the mocap again.

    I've tried instantiating a clone of the object and something like this in Update() but that didn't work:
    Code (CSharp):
    1. cloneAnimator.Play(originalAnimator.GetCurrentAnimatorStateInfo(0).fullPathHash, 0, originalAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime);
    Is there any viable way of doing this? I'm using Unity 2022.3.18f1.