Search the Community
Showing results for tags 'meshes array'.
-
Hello, I import .babylon files to use in scenes regularly; however, there is a bit of knowledge I'm lacking to fully understand how to use each of the elements in my scene independently. As an example, the following is typical code used to import a scene from Blender and clone many hierarchical meshes from this one .babylon file: And this always works - however, I often need to animate several of the meshes from this one scene separately - such as this scene above is an airplane with a propeller on the front which needs to be animated on many clones of the plane. So what I'm not clear on from reading the documentation as well as running many playground searches, is how to access the other meshes in the scene such as the propeller. I have tried to get mesh by name, access different slots in the newMeshes[] array, and every other method I can think of - but have not been able to access the propeller or other objects in the .babylon file in a simple method. The only way I've been able to animate these other meshes is to import each additional mesh separately, parent the mesh to the plane (such as the propeller) back onto the plane, and animate it's rotation separately. However, I assume this is far more effort than is necessary, and I cannot get the information I require to simplify this from the documentation. So in looking at the above code where I'm importing an airplane with a propeller and cloning the airplane and it's children including the propeller - how do I access and animate the propeller in this scene without having to re-import the propeller, parent to the plane, and then animate the rotation? The propeller is already in the scene, but I simply don't know how to access and assign the propeller in the scene to a variable and/or array to then animate as a separate object. Even though I believe the explanation is easy to understand, I've attached the Blender file so that you can see what I'm speaking about in animating the propeller(simply rotating it.) If there is a playground scene which clearly demonstrates this, it would be much appreciated. although I cannot find one. Only the "Dude" scenes, which aren't relevant to my current needs as I need to animate meshes from the scene in the babylon engine - not in Blender. I know this is done by many users on this forum regularly, but I cannot locate the info on how to set this up myself. As always, any help is greatly appreciated. Thank you, DB biplane_model.zip
- 3 replies
-
- .babylon
- meshes array
-
(and 1 more)
Tagged with: