Adem Posted December 28, 2016 Share Posted December 28, 2016 hy everyone, i want to scale imported scene BABYLON.SceneLoader.Load("BattleGround/", "BattleGround.babylon", engine, function (newScene) { Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted December 28, 2016 Share Posted December 28, 2016 Hi @Adem It's probably best to do before you export it, depending on it's contents and setup. Adem 1 Quote Link to comment Share on other sites More sharing options...
Adem Posted December 28, 2016 Author Share Posted December 28, 2016 @aWeirdo, nice, but is there a way to do it manually with code? Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted December 28, 2016 Share Posted December 28, 2016 @Adem Yes, mesh.scaling = new BABYLON.Vector3( 1, 1, 1); //1 = no scaling, 2 = twice the size, etc. but if your scene contains several, seperate meshes, it may mess with the positioning, scaling changes the size of a mesh, but not the position relative to other meshes, See this example; 3 meshes, 2 spheres, one at each end of the plane,http://www.babylonjs-playground.com/#1XGCEA#0 Now see the same scene scaled by 2.http://www.babylonjs-playground.com/#1XGCEA#1 Adem 1 Quote Link to comment Share on other sites More sharing options...
Adem Posted December 28, 2016 Author Share Posted December 28, 2016 @aWeirdo thanks, that worked fine Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.