When dealing with military games, especially FPSes, we need to define a waypoint value, by its capacity, to be a good cover point with maximum visibility for shooting or reaching other enemies visually. This recipe helps us to compute the waypoint's value given these parameters.
Analyzing waypoints by cover and visibility
Getting ready
We need to create a function for checking whether a position is in the same room as the others:
public bool IsInSameRoom(Vector3 from, Vector3 location, string tagWall = "Wall") { RaycastHit[] hits; Vector3 direction = location - from; float rayLength = direction.magnitude; direction.Normalize(); Ray ray = new Ray(from, direction); hits = Physics...