GLB files Animations

Hello, I’m sorry, I’m kind of lost, and none of the videos I found really helped me…

I’m trying to get the animations working in the GLB file I have. I can see those animations in the editor as “Take 001” but I can’t make it work in my code.
In this Take 001, there is many different animations, and I would like to play only 1 (“idle”) and another one when you touch the object (“die”).

Anyone can help me.?
here is the file: Bear.glb (63.4 KB)

Thank you.

Normally you have for each animation (run, jump, sit down etc.) a separate animation clip. In your glTF asset, you have only one containing everything.

It is possible to use AnimationUtils.subclip() to create new animations clips by extracting a specific segment from the given one. However, this requires that you now the exact start and end frame.

If you are managing the animations by yourself, consider to author and export them in a way so you have for each animation an own clip.

I don’t really understand this, and I posted the file so someone could tell me precisely what I should do.

“However, this requires that you now the exact start and end frame.” This doesn’t make any sense for me.
The full animation is running in the editor, but when I “console.log(animations)” I can see every body parts, but I don’t really understand what makes the “idle” or “jump” animation.

I forgot to say, it’s an object from Unity, and there is a “.controller” file. But I can’t really read it, and I don’t know if I can use it in React Three Fiber…Animals1_FourLeggedCont.controller (15.5 KB)

This is a unity specific object you will not be able to use in React Three Fiber

For the previous help you were given. Each animation has a specific start and end time within the overall clip Mugen87’s suggestion was to call the specific animations you want based on those timings.

Think of the animation like an old movie reel, you are playing the whole movie at the minute, you want to instead jump to a particular scene start from there and then stop again.