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();
}*_