Different meshes using the same animation

Hello there

I put some animations from mixamo / blender in the babylon editor, I exported the final scene and assets and then I appended it to my scene, but when I try to animate one character, all the characters get the same animation.

Here’s what I’m using:

var character = scene.getMeshByName("mesh_name");
scene.beginAnimation(character, 0, 1450, true);

var character2 = scene.getMeshByName("mesh2_name");
scene.beginAnimation(character2, 0, 1300, true);

In this case above, character2 gets the same animation from character. Even if I don’t declare the character2, it gets the animation from character.

Am I missing some steps?
Thank you all

Edit: One thing I noticed is that when I use the Play Animations at the Babylon Editor in my Babylon Project, the meshes have different animations, but when I export the final scene and assets, all of the meshes get the same animation.

Pinging @julien-moreau who made the editor.

Also, I think a repro in the Playground would help here.

Just figured it out!!!

It happens that when I created the .babylon from each character, all of them had the same skeleton id, so when I exported the scene, one unique animation was attaching to them.

All I nedded to do was getting into the .babylon from each character and change the skeletonId of each character to be unique!

1 Like

Hey @Humberto_Tello nice catch! Happy that you found the issue :slight_smile:

Just to be sure, are you using the Editor v3 or v4? I recently opened beta tests for the v4 and I highly recommand that you start working with the v4, especially if your project is not at an advanced state :slight_smile: The Editor v4 has been made from scratch to be more stable/powerful.

You can download betas here: BabylonJS Editor v4.0.0 beta · BabylonJS/Editor Wiki · GitHub
And follow the documentation still WIP here: Editor/doc.md at release/4.0.0 · BabylonJS/Editor · GitHub

Hi, @julien-moreaum, I think I’m using the Editor v3, because I use the version from the site http://editor.babylonjs.com/

But I’ll make sure to use the v4 version in my next project, thanks for the advise!