Manipulating vertices through colliders

Hey, I’m experimenting with Fog of War and trying a different approach than the usual raycast/transparency. I have a plane’s vertices stored in an Vector3 array. I also have a sphere collider that checks if there are any vertices in it and if there are, submerge them by putting their Y on -1.

Now the mesh reacts to it, but not how its suppose to. Currently only the center few vertices seem to react on my sphere collider.
Anyone any idea where I went wrong? This is my current script:

	for(int i = 0; i < vertices.Length;i++){
		vertices _= OriginalPositions*;*_

_ if(ManipulatingObject.bounds.Contains(OriginalPositions*)){
vertices.x = -1;
}
mesh.vertices = vertices;
mesh.RecalculateNormals();
}*_

Apparently, vertices are in local space, so it’s necessary to convert them to world space using transform.TransformPoint. Also, apparently my axes were off. Working script:

	for(int i = 0; i < vertices.Length;i++){
		vertex = OriginalPositions*;*
  •   	Vector3 temp = vertex;*
    
  •   	temp = transform.TransformPoint(vertex);*
    
  •   	if(ManipulatingObject.bounds.Contains(temp)){*
    
  •   		//Debug.Log (temp);*
    
  •   		vertex.z = -1;*
    
  •   	}*
    

_ vertices = vertex;_
* mesh.vertices = vertices;*
* }*