Jump to content

Cloning object imported from incremental babylon file


Bhupi
 Share

Recommended Posts

Hi.

I imported a few 3D objects via .babylon files.

Eg: BABYLON.SceneLoader.ImportMesh("", "assets/", "myobject.babylon", scene, function(newMeshes) { 

    // play around with position, apply textures and clone at different positions

    var object_mesh = newMeshes[0];

    var object_mesh_cloned = object_mesh.clone("cloned_object");

});

I cloned the object and placed it in different positions.

I used the C# executable (had to do a slight code change to make it work as the default code was failing when reading args passed to it) and created incremental files.

I imported the incremental babylon:

Eg: BABYLON.SceneLoader.ImportMesh("", "assets/", "myobject.incremental.babylon", scene, function(newMeshes) { 

    // play around with position and apply textures

    var object_mesh = newMeshes[0];

    var object_mesh_cloned = object_mesh.clone("cloned_object");

});

The issue is that the cloned objects do not appear when I tried cloning via the incremental route. Is it because the meshes are not loaded? Can there be a callback when the actual meshes have been loaded so that those can be cloned?

 

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...