Search the Community
Showing results for tags 'loadedmeshes'.
-
After I import the mesh, if I don't change his position and if I don't change the camera's position, all is well. But I want after loading the mesh entirely intermeddle in screen, without zooming with the mouse wheel. If I change the mesh position it becomes impossible to twist the mouse. mesh.onSuccess = function (task) { m = task.loadedMeshes; for(var i = 1; i < m.length; i++) { m.position = new BABYLON.Vector3(25, -250, -40); } If I change the camera position also becomes impossible to twist the mouse. var cam = new BABYLON.ArcRotateCamera("ArcRotateCamera", 0, 1.8, 5, new BABYLON.Vector3(170, -50, 10), scene); Working option but the mesh won't fit in the screen. http://178.62.253.28/ test page After the change of position of the mesh loaded it does not work normally turn the mouse. http://178.62.253.28/pos_mesh test page http://178.62.253.28/st/z_pm.js If you change the camera's position is also that the mesh can't be controlled. http://178.62.253.28/pos_cam test page http://178.62.253.28/st/z_pc.js
- 18 replies
-
- position
- loadedmeshes
-
(and 3 more)
Tagged with:
-
I load the mesh .obj, does not have .mtl, and then assign texture. var mesh = loader.addMeshTask("mesh1", "", "/file/", "mesh.obj"); mesh.onSuccess = function (task) { var m = task.loadedMeshes[0]; m.position = new BABYLON.Vector3(100, 500, 100); m.material = new BABYLON.StandardMaterial("texture1", scene); m.material.diffuseTexture = new BABYLON.Texture( "/file/diffuse.png", scene); m.material.specularTexture = new BABYLON.Texture( "/file/specular.png", scene); m.material.ambientTexture = new BABYLON.Texture( "/file/ambient.png", scene); m.material.bumpTexture = new BABYLON.Texture( "/file/bump.png", scene); } But the texture is not assigned to an object. Am I doing something wrong or this may be a problem with the mesh ?
- 12 replies
-
- loadedmeshes
- obj
-
(and 1 more)
Tagged with: