- Home /
Edit Mesh Edge to Match Overlapping Object or Obstruction
Hey Unity Devs,
I haven't yet attempted to implement this, but I have a problem involving AI fields of view. It looks like this:
The way it works is that a circle arc is calculated by number of vertices and then joined at the first vertex. The vertices are of course then used to generate mesh triangles, and finally a mesh.
My problem is that I want the FOV to be obstructed by objects in the way. By that I mean it should visually stop at the edge of colliders or objects it hits. For example, in the following picture, I'd like the mesh to wrap its vertices around the ship within the FOV:
I'd like it to wrap the vertices around the red area. Has anyone come across this issue before? How would you solve it? I'm willing to switch off of mesh generation if there is a better solution.
Thanks a lot!