Jump to content

[SOLVED] Clone dynamic mesh.


photo

Recommended Posts

Posted

Is there a way to clone a dynamic mesh so it clones all vertices and indexes etc as well? I've tried ObjectMeshDynamic.clone() and node_clone(). It looks like the cloned objects still references on the same vertex and index buffers. :-(

Posted

It looks like the cloned objects still references on the same vertex and index buffers. :-(

 

That's right and it does make sense to save GPU buffer resources if identical meshes should just be rendered multiple times e.g. just with different node transformations. If you need "deep" cloning including vertex/index mesh data duplication you can do it via a Unigine script functions ObjectMeshDynamic::get/setVertex/Normal/TexCoord/index()

×
×
  • Create New...