cinetec_tech Posted January 23, 2015 Share Posted January 23, 2015 hi we have met a serious issue when trying to addindex to a instanced objectmeshdynamic object. after addindex to a instanced objectmeshdynamic. the surface end will be wrong. to reproduce, just open the attached world. and save the world. the result is showed in the log. the num_indices is updated correctly. but surface end is wrong. clone_issue.rar Link to comment
unclebob Posted January 23, 2015 Share Posted January 23, 2015 Hi there! When you copy ObjectMeshDynamic via clone method, it doesn't actually duplicate its inner mesh data, so you'll have two nodes with one shared mesh between them. And any changes you make in the copy will be applied to the original node as well. To make a full copy, you need to copy original geometry to mesh and create new ObjectMeshDynamic. Please find modified code in the attachments. clone_test.zip Link to comment
cinetec_tech Posted January 23, 2015 Author Share Posted January 23, 2015 Hi there! When you copy ObjectMeshDynamic via clone method, it doesn't actually duplicate its inner mesh data, so you'll have two nodes with one shared mesh between them. And any changes you make in the copy will be applied to the original node as well. To make a full copy, you need to copy original geometry to mesh and create new ObjectMeshDynamic. Please find modified code in the attachments. hi bob: yes. we know that. but the unigine clone (ctrl+d) is a instance clone. which we couldn't change. is there any way to make add index work for instance geometry? thanks Link to comment
unclebob Posted January 23, 2015 Share Posted January 23, 2015 Hi, You have few options: 1) Get mesh from your clone, make a new ObjectMeshDynamic from clone geometry and remove clone; 2) Get mesh from origianl node, clear clone geometry and apply that mesh to clone. Link to comment
Recommended Posts