Hi everyone! I have a similar pickle that the person in this thread: How the heck do you load in your model with animations?
I’m trying to develop a large-ish game with Babylon.js. Currently I have some static models (wall pieces, floor pieces, general assets and objects that are in the map) and now some characters with animations. I currently use the AssetsManager to load all the required stuff, with bit of a different handling on the success -method with static assets and characters.
What I try to do with characters is the following:
- Load the character glb file with AssetsManager
- When needed, fetch the character model and animations and play one of the many animations
- Change the animation if needed (running to walk, inspired by https://playground.babylonjs.com/#6I67BL#2)
This requires me to clone the mesh and animations somehow. The animations per clone need to be individual as well. In the other thread there was this solution: https://playground.babylonjs.com/#AJA5J6#76
However, I would prefer to use AssetsManager and store the models/animations to a storage I can kind of take care of my own, if possible. Other reason to use AssetsManager is that the loader for all asset types is the same one.
So the question is can I use the AssetsManager to load somewhat complex characters and clone them with animations somehow? I’ve been trying to figure this out with my own model for hours now, feeling a bit desperate… The model I am currently using is working in sandbox perfectly with multiple animations and it also loads into the scene well (if setEnabled(true)). The only problem is the actual instantiation of the characters to the scene with the animations.