Problem when modifying staticmesh
Posted: Sun Jul 29, 2012 7:50 am
Hi,
I have terrain that can be modified and I use staticmeshes for it.
After the vertex and index data is changed, I call
staticMesh.Mesh.Tree.Refit();
staticMesh.UpdateBoundingBox();
This works mostly fine. The problem is that when there is some still object on the mesh (I have tried sphere and CharacterController so far) and a hole is made into the mesh under the object, the object does not fall unless something hits it.
Can I inform the object somehow that the mesh has changed or is there some other possible fix for this? I tried disabling DeactivationManager in case it had something to do with the problem but it did not help.
Thanks!
I have terrain that can be modified and I use staticmeshes for it.
After the vertex and index data is changed, I call
staticMesh.Mesh.Tree.Refit();
staticMesh.UpdateBoundingBox();
This works mostly fine. The problem is that when there is some still object on the mesh (I have tried sphere and CharacterController so far) and a hole is made into the mesh under the object, the object does not fall unless something hits it.
Can I inform the object somehow that the mesh has changed or is there some other possible fix for this? I tried disabling DeactivationManager in case it had something to do with the problem but it did not help.
Thanks!