Hello, I assume there's an algorithm out there for this but I'm having trouble finding it. I am using a navigation mesh to calculate paths and hope to use the mesh for determining line of sight as well, if possible. I'm not very smart with geometry, I'd appreciate as much info as possible
Problem:
Players shouldn't be able to see around corners. The server needs to be aware of what the player can see without relying on the client's view. Raycasts will only work client-sided. I prefer a cheap method that gives performance over an expensive method with great accuracy.
Diagram:
http://puu.sh/sdcRP/cc2b9fa39d.jpg
Marked yellow are vertex points that are within the line of sight, dark green M are enemies outside line of sight. I can use client-side lighting to generate shadows and hide monsters accordingly however the server needs to be able to do this strictly by code. It's not necessary to find line of sight in a 360 degree radius, I only need to know if point A can be seen by point B strictly by traversing vertex points on the nav mesh