I load mesh using BABYLON.SceneLoader.ImportMesh :
if (!pickInfo.hit) {
var position = getGroundPosition();
BABYLON.SceneLoader.ImportMesh("", “./assets/images/obj/”, “sonic-the-hedgehog.babylon”, scene, function (newMeshes) {
newMeshes.forEach(function (mesh)
mesh.position = position;
})
});
}
My object contain many meshes.
I want to combined all meshes for my object to have one object.
i always get this :
babylon.js:16 BJS - [11:44:47]: Unable to import meshes from ./assets/images/obj/sonic-the-hedgehog.babylon: Error in onSuccess callback: TypeError: Cannot read property ‘length’ of undefined
google can fix this !!
babylon.js:16 BJS - [11:44:47]: Unable to import meshes from ./assets/images/obj/sonic-the-hedgehog.babylon: Error in onSuccess callback: TypeError: Cannot read property ‘length’ of undefined