jurito Posted February 28, 2018 Share Posted February 28, 2018 Hi there, i'm quite a babylonjs newbie and i'm having a bit of a problem importing an .obj containing many meshes (with SceneLoader.LoadAssetContainer). What I'd like to achieve is cycle through the container.meshes array and - according to their name - add some of them to the scene and use the others to fill a coordinates array. If I attach them (scene.addMesh) everyhing is in its place, but logging their position (or absolutePosition) always returns (x:0,y:0,z:0). It's probably an easy one but i can't sort out what i do wrong. Anyone can help? TIA Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted February 28, 2018 Share Posted February 28, 2018 because when exporting an obj it only records vertex position and not origin. So in order to import an obj like this and wanting to manipulate the positions you need to import the objects that will move independently and then use a flags/blank objects with certain name on your scene obj to position the elements after. Its actually quite a process when using obj's like this. Quote Link to comment Share on other sites More sharing options...
jurito Posted March 1, 2018 Author Share Posted March 1, 2018 thanks for clarifying that. Exported from blender to .babylon and no problems thus far. 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.