17-08-2018, 04:57 AM
Hello!
My current fluid setup uses a mesh collider with the obi collider. When the mesh changes the obi.collider does not. The workaround i found for this is to delete the obi.collider and then re-add it, all in the same frame. This updates the obi.collider with the new mesh and everything works well.
A problem I encountered with this is that the destroyed obi.collider still maintains a reference to an object somewhere and therefore doesn't get fully destroyed by the Garbage collector and slowly adds to the memory until it crashes.
I've tried removing the 'Source Collider' in the Obi.Collider and re-adding it, but this just seems to disable the obi.collider entirely.
Is there a way that i can 'reset' the Obi.Collider once changes in the Mesh collider have been made?
Thank you!
My current fluid setup uses a mesh collider with the obi collider. When the mesh changes the obi.collider does not. The workaround i found for this is to delete the obi.collider and then re-add it, all in the same frame. This updates the obi.collider with the new mesh and everything works well.
A problem I encountered with this is that the destroyed obi.collider still maintains a reference to an object somewhere and therefore doesn't get fully destroyed by the Garbage collector and slowly adds to the memory until it crashes.
I've tried removing the 'Source Collider' in the Obi.Collider and re-adding it, but this just seems to disable the obi.collider entirely.
Is there a way that i can 'reset' the Obi.Collider once changes in the Mesh collider have been made?
Thank you!