How to load a new animation and apply it to a playing model+animation. Any example of this?
I am testing with these files, but everything I load separately does not seem to play.
https://sbcode.net/threejs/gltf-animation/
How to load a new animation and apply it to a playing model+animation. Any example of this?
I am testing with these files, but everything I load separately does not seem to play.
https://sbcode.net/threejs/gltf-animation/
The problem is likely bug in your code.
Here is a more recent example that does the same thing. It loads animations separately and applies them to an exisiting model that already has an animation, but in a slightly different way.
Maybe you can find a clue in this.
If you’re loading different animations, they have to match the skeleton/bone names exactly.
You can check this by inspecting the animation.tracks and seeing that the names referenced in the tracks of the new animation match the names of the bones in your skeleton.
Sometimes you’ll find that the modelling software or exporter had to rename the bones for some reason (like adding .001 or smth) , and you will have to remap/ fix up the names in your animation tracks to all match exactly.
pfffff. thanks, finally something that moves ![]()
No, that walking example doesn’t move. Its a visual trick. Only the floor moves.
In this example below, the model and camera moves.
Yes, I suspected, that is why I was using the files of the example. For now I am just checking how to do this and how big these animations are. I think at some point I like to add / update animations. Don’t really feel like updating then every glb.
Nice. interesting you can capture the mouse like this and make it disappear.
Thats using the pointerlockcontrols.
You have an example to load bones/skeleton separate?