EvilWeevil wrote:
I was trying to work with the OnCollisionEnter void.
void OnCollisionEnter(Collision other)
{
if (other.gameObject.CompareTag ("Player"))
...
As far as I can remember I haven't worked with the OnCollisionEnter functionality and so it might not work (I may not have implemented whatever internal setup would be required). Cubiquity volumes don't have a MeshCollider component attached, but instead they have a VolumeCollider which internally does set up a number of MeshColliders for each chunk. I can imagine that for OnCollisionEnter() to work there may need to be some additional messaging/communication between the MeshColliders which are used internally and the VolumeCollider which is exposed to the user. It can probably be made to work if you are feeling brave about diving into the code base :-)
Failing that, you may need to rely on other techniques. The ClickToDestroy script already shows how to iterate over the voxels in a given part of the volume, so in the case of your expanding sphere you may just need to call this with increasingly large spheres. Or maybe spread the calls over several frames. Or build a list in advance of the voxels to be removed and remove a few each frame. Actually I'm not exactly sure of the best approach, some experimentation may be needed. How big does your sphere need to get?