Jump to content

[SOLVED] [2.0] incorrect surface end when addindex on instanced objectmeshdynamic


photo

Recommended Posts

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

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

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

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
×
×
  • Create New...