Is this possible to share animation between two imported models?

Let’s say we imported some model (GLB) with a few animations included.
Then we imported some another model which doesn’t have animations. Can we use those animations imported from the last glb-file and apply them to the second model? Both models have the same armature (bones structure and bone names).

Shortly - yes, you can.

Ok, then how to do it?
Inside ImportMesh method I get a reference to some animation:
const walkAnim = scene.getAnimationGroupByName( "Walking" );
So how to pass this animation to another model, let’s say scene2 of ImportedMesh()?

Here are 2 examples which you may use for your needs

2 Likes