HELP! Import Animation

Hello! I trying playing animation following this example
But I try to get and play my animation, but the code not returning anything that I need.
This is my code:

It’s my first time with babylon.

Hello and welcome!

which tools did you use to create the .babylon file? I see no animation on your skeleton :frowning:

I’m using maya.
When I import to model in sandbox everything works. Very strange

Are you sure the animation is on your skeleton? Could it be on the mesh itself?

1 Like

As @Deltakosh points out the animations could be on the meshes. I’m not sure a 3 bone skeleton is necessary for opening a door (unless it somehow bends in the middle!). Here is an example :

A desk

Just click on the drawers and cupboard fronts. Click again to close them

As for your model, any attempt to play the animation results in “undefined” in the console. So if the file contains an animation - it is hiding somewhere.

cheers, gryff :slight_smile:

The door just a test for understand how work, for learn how can I call animation and play.
Do you know why work on sandbox? In sandbox show all my animation states and work everything correct. Do you know if have a different method for get and play animations?

I would like to know too how can I play animation from the mesh without joints.


Not sure if it helps but here is how the sandbox does it : Babylon.js/animation.js at master · BabylonJS/Babylon.js · GitHub It relies on animationGroups: Group Animations - Babylon.js Documentation