Ploopploop Posted June 6, 2018 Share Posted June 6, 2018 I want to import my .babylon model with animation into my code but the model didn't appear and if it does appear, the animation won't work. This is the code var human = new BABYLON.Mesh.CreateBox("human", 1.0, scene); human.isVisible = false; human.position.y = 0; human.position.x = 0; BABYLON.SceneLoader.ImportMesh("", "models/Vanquish/Human/", "Humans.babylon", scene, function(newMeshes, particleSystems, skeletons){ skeleton = skeletons[0]; skeletonMesh = newMeshes[0]; scene.beginAnimation(skeleton, 0, 20, false, 2.5); for(i = 0; i < newMeshes.length; i++){ newMeshes.parent = human; } }); Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 6, 2018 Share Posted June 6, 2018 Hiya PP, welcome to the forum. See this BJS playground scene? https://www.babylonjs-playground.com/#WMW8#8 Can you edit that (as often as you like) and make new saves (as often as you like)... and somehow get your Humans.babylon (or some other SMALL/SIMPLE .babylon file... to load-in from a public/github URL/location? That would make it easier for us to help. I hope it is a simple/basic scene... something small to troubleshoot the mesh loading. A small .babylon file is good to start-with, using simple and short animation. Please try to provide these things. Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.