Search the Community
Showing results for tags '3dsmaxCamera'.
-
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(); }); }); });