Copying Mixamo's animation to another model with same naming hierarchy

I am trying to copy a mixamo model’s animation to another model with same hierarchy.
Now this model also has WASD movement controls.

The animation and movement works great if we run the original model. But if i copy the original model’s animation to another model (with same hierarchy), the animation runs but the movement is not happening.

How can I fix this ?

Any leads here @Mugen87 ?

Do you mind showing how you are doing this in your code?

@Mugen87

    const gltf = await loadModel(url); //dynamic model with same hierarchy
    const avatar = gltf.scene;
    const animationMasterModel = await loadModel(Model); //this is the original master model for animations
    const animationList = new Map();
    let animationMixer = new THREE.AnimationMixer(avatar);
    gltf.animations = animationMasterModel.animations;
    animationMasterModel.animations.forEach((clip) => {
    animationList.set(clip.name, animationMixer.clipAction(clip))
    animationList.get(clip.name).play()
        })
        

Now I just update the animation mixer in render loop.

It’s like the animation mixer.update() and the character movements are interfering with each other.

Animation clips (to be more precise their keyframe tracks) target their 3D objects with unique names. You can see these in the following example where animation clips are created manually: misc_animation_keys

These identifiers might contain specific names from your master model (from Object3D.name) which are not present in your other asset. Hence, playing these animation clips shows no effect since the mixer can’t associate the animated data to the 3D objects.

So even if the hierarchy is the same, please ensure that also Object3D.name values of all 3D nodes are identical.

@Mugen87 The animations are playing perfectly. But when I start moving the character, and the animations starts to play, the character is not moving forward.

Moving through this

this.model.position.z += moveZ;

It’s like the animation mixer.update() and the character movements are interfering with each other.