How to Access Meshes for Animation Control

Hi there,

I have been searching this forum quite a while, but I am still stuck.
I have a *.babylon with an animated Suzanne with activated Autostart.

But how can I access different meshes by name, so I can Start and Stop Animation later based on user Input?

GetMeshByName returns undefined for me.
The Meshes are called “Suzanne” and “StaticCube”.
Can someone point me in the right direction?

Thank you very much!

Playground is here:

for (m in newMeshes){
    if (newMeshes[m].name == "Suzanne"){

(m : indices, newMeshes[m] : meshes)
Save as var and refer it later and call stopAnimation function.

var mesh = BABYLON.SceneLoader.ImportMesh("", "", "suzanne.babylon", scene, function (newMeshes) {

output: Suzanne
also worked

Hey man,
thank you!
Worked like a Charm!

1 Like

So the animation is tied to a particular mesh on the import or is imported all inclusively under the guise of a mesh