I am having trouble loading a glTF model. I literally just yesterday found out how to load an OBJ model, but now today I am having more trouble.
I am trying to load a glTF model and position it so it looks like its in a hand. I did that with an OBJ model like this:
BABYLON.SceneLoader.ImportMesh("",
"https://dl.dropbox.com/s/4x3e5136opsm9el/", "m1911-handgun.obj", scene, function(newMeshes){
console.log(newMeshes);
var g = new BABYLON.TransformNode();
for (var m of newMeshes) {
m.parent = g;
}
g.renderingGroupId = 1;
g.material = gunMat;
g.parent = camera;
g.position = new BABYLON.Vector3(1, -2, 5);
g.scaling.scaleInPlace(0.05);
});
That code works .But when I try to load an animated glTF model it does not. How could I do this?
Here is a repro: Babylon.js Playground