Jump to content

OBJ imported meshes position


jurito
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...