• Content Count

  • Joined

  • Last visited

  1. Thanks for both of your answers and I do see that wingnuts answer is probably the best way to go, it just means I will have to re-program some things to accommodate it but that shouldn't be a problem lol, so as you suggested JohnK i shall put wingnuts answer as solved, once I have finished the wedsite I shall post a link on here then maybe get peoples feedback which is always a good thing. Regards Andy
  2. Hi again Johnx, Thanks again for replying and thanks for your help, I have found a way of doing what I wanted, there is probability a better way of doing this but this seems to work fine for me: The line before scene.meshes[0] = meshes[0]; I put the line scene.meshes[0].visibility = 0; and that seemed to do the trick, so I will mark this as answered. Thanks again Andy
  3. Hi Jonhk, thanks for replying. I have tried what you suggested but unfortunately I still have problems, what I am trying to achieve is this. I have developed a website that is selling different types of headboards for beds I have created the models in 3dsmax, there are 6 widths and 3 height to the headboards which are stored in a single babylon.js for each model. When the user selects a different height or width I then want to import the model into the existing scene, but at the mo even after what you suggested the imported mesh gets put to the end of the meshes array and the mesh that was previously displayed does not get removed and is still visible. I have tried to figure this out but had no luck so far. Is there a way I can remove or delete the current mesh before I import the new mesh. Thanks Andy
  4. Hi all, I am hoping someone on here can help me as I have given up trying to search for the answer. I have a scene with 29 meshes and what I would like to achieve is to import a new mesh from another scene file into one of the already existing mesh locations e.g scene.meshes[0]. What I would like to know is, is this possible using ImportMesh and if so how would one achieve this, any help would be much appreciated. Regards Andy
  5. Thanks for replying Deltakosh that seemed to do the trick, I knew it had to be something simple lol, thanks again for your help.
  6. Hi all. I am quite new to Babylon.js as well as Javascript so I guess this problem I have has a simple solution but I have been trying for a few hours now without success. I have a simple SceneLoader.Load routine to load a 3dsmax scene into my project, the scene contains a few meshes a light and a camera. All I wish to do is implement an ArcRotateCamera using the Betalimit and Alphalimit for restrictions but I can't seem to get it to move at all, so obviously I am doing something wrong, if anyone can point me in the wright direction I would be very grateful. Here is the code I am using. BABYLON.SceneLoader.Load("scenes/", "test.babylon", engine, function (scene) { scene.executeWhenReady(function () { var camera = new BABYLON.ArcRotateCamera("camera", 130.4, 1.3, 120, BABYLON.Vector3.Zero(), scene); camera.attachControl(canvas, true); scene.lights[0].intensity = 1.2; // Add shadows var shadowGenerator = new BABYLON.ShadowGenerator(2048, scene.lights[0]); for (var i = 0; i < scene.meshes.length; ++i) { shadowGenerator.getShadowMap().renderList.push(scene.meshes); shadowGenerator.setDarkness(0.8); scene.meshes.receiveShadows = true; }; camera.lowerBetaLimit = 1.2; camera.upperBetaLimit = 1.4; camera.lowerAlphaLimit = 129.9; camera.upperAlphaLimit = 130.9; // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { scene.render(); }); }); });