Search the Community
Showing results for tags '3dsmax exported babylon file mesh manuplation problem'.
-
Hi all I m newbie on Babylon since 2 days from Turkiye ; I created a scene on 3dsmax and exported to babylon file format scene working good on browser with textures (firefox) then added a arcrotate camera is good added some lines and i can scale rotate etc lines worked : now its a problem for me ; i want manuplate a mesh in imported babylon file for scale rotate or move or change texture i can see mesh name on mesh tree, when i add this line on script file mymeshname.rotation.y = Math.PI / 6; scene cant load on browser :((( How to select mesh in babylon file ?? and change scale rotation texture etc. please help me its html file working <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Babylon imported max</title> <!-- Babylon.js --> <script src="./JS/babylon.2.3.js"></script> <style> html, body { overflow: hidden; width: 100%; height: 100%; margin: 0; padding: 0; } #renderCanvas { width: 100%; height: 100%; touch-action: none; } </style> </head> <body> <canvas id="renderCanvas"></canvas> <script> if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "kek.babylon", engine, function (Scene) { Scene.executeWhenReady(function () { var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 50, BABYLON.Vector3(0,0,0), Scene); Scene.activeCamera = camera; camera.attachControl(canvas, true); camera.setPosition(new BABYLON.Vector3(0,2000,-3000)); camera.lowerBetaLimit = 0.1; camera.upperBetaLimit = (Math.PI / 2) * 0.9; Scene.debugLayer.show(); var lines = BABYLON.Mesh.CreateLines("lines", [ new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(1000, 1000, 500) ], Scene); // PROBLEM HERE ??? ****************************************************** "kaldirim" is my mesh name in babylon file *********** // kaldirim.rotation.y = Math.PI / 6; // PROBLEM HERE ??? ********************** engine.runRenderLoop(function() { Scene.render(); }); }); }, function (progress) { // To do: give progress feedback to user }); } </script> </body> </html> Thanks all