GLB Animation Group (control) (NO SKELETON)

thanks everyone!

in this example we have a .GLB that contains 4 animation groups:
https://playground.babylonjs.com/#ZQPDEF#4

 flight_path_1
 flight_path_2
 flight_path_3
 idle

by default always the last one in the group is the animation that is executed, I have stopped this action.

How can I execute one of the groups specifically? for example: flight_path_1

all the examples on this topic refer to the use of skeletons.

I would really appreciate any help.

2 Likes

Can you try something like this?

https://playground.babylonjs.com/#ZQPDEF#7

Basically stop the idle animation group and start the first animation group.

scene.animationGroups[3].stop();
scene.animationGroups[0].start(true);
2 Likes

thank you!

some way to refer to the groups of animations through the mesh when it is loaded. not referring to the scene.

that situation where more than one GLTFs are loaded in the same scene and with their own groups animations each.

is this possible?

1 Like

Oddly, the loaded animation groups are missing from the assets manager class. I’ll fix this.

If you use SceneLoader.ImportMesh directly, then it will return the animation groups that were loaded.

https://playground.babylonjs.com/#ZQPDEF#8

2 Likes

Oddly, the loaded animation groups are missing from the assets manager class. I’ll fix this.

Fixed with Assets manager fix by bghgary · Pull Request #5693 · BabylonJS/Babylon.js · GitHub

2 Likes

thank you.

that work for me!.

1 Like

Animation Groups are really awesome. @bghgary very cool. We also had success with animating skeletons… but didn’t know about animationGroups until reading this. So thx @azappdor this rocks!

Question: this awesome aeroplane .glb (and others like it) what program is being used to create them? Paint3D or Blender…or?

Thanks
~falcon

I believe these were created in Maya.

1 Like

I confirm they come from Maya

1 Like