scene.beginAnimation is undefined?

I’m working on a project using animations, and keep getting an error that scene.beginAnimation is undefined. Due to the complexity of the project, a simple playground demo is not possible.

Reproduction:

After adding a breakpoint and viewing in DevTools, the scene appears to be perfectly fine (though it is missing some of the animation functions).

Edit: Note that the project is using Babylon v5.27

I just watched your second video and it shows:

temp1.bginAnimation
undefined

Is there an “e” missing?

1 Like

image
There was an e missing… The function is still undefined with the correct spelling though.

Oh you are right, you typed it manually in the video.

1 Like

Just me typing stuff wrong

Hello! I haven’t checked the project, but beginAnimation is defined in Animations/animatable.ts, so you may need to import that in the file you call?

2 Likes

Yes!

Having import '@babylonjs/core/Animations/animatable.js'; in the file I declare the scene fixes the issue. Thanks for the help!

1 Like