aaronmck Posted August 9, 2016 Share Posted August 9, 2016 Hi, I have created a scene and I have imported multiple models using the BABYLON.SceneLoader.ImportMesh function. When I run it some of them are stacked on top of each other Could someone instruct me know how I go about positioning them in the scene please? Thanks Quote Link to comment Share on other sites More sharing options...
RaananW Posted August 9, 2016 Share Posted August 9, 2016 ImportMesh has a success callback. you could (and should) reposition your meshes there - like this - http://www.babylonjs-playground.com/#NQIWX Quote Link to comment Share on other sites More sharing options...
aaronmck Posted August 9, 2016 Author Share Posted August 9, 2016 Perfect thanks, just one more question. When I use that method on a model with multiple separate pieces it only move one piece. Can I do it so as the entire model moves? Quote Link to comment Share on other sites More sharing options...
gryff Posted August 9, 2016 Share Posted August 9, 2016 Well @aaronmck you could take one piece and make it the parent of the other pieces - then just move the parent. If you use a modeler like Blender you can set up parent/child relationships directly without having to code it in your mesh loading. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 9, 2016 Share Posted August 9, 2016 read the doc and start using playgroundhttp://babylonjs-playground.com/#W3Y0O#0> Best 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.