Enemy FOV Cone Detection Angle Check

Screen caller measured 2D target/forward vectors against inclusive cone/range and separately declared clear sightline; coincident target uses zero angle convention, no automatic occlusion or enemy AI model.

Description

A planar field of view combines angular and range gates with caller line-of-sight evidence.

A planar field of view combines angular and range gates with caller line-of-sight evidence. A coincident target has zero angular offset.1

Enter two-component forward and relative-target vectors, nonzero forward, full angle 0–360, nonnegative range and line-of-sight boolean. Use scaled vectors for the signed angle; return distance and inclusive angle/range/detection flags.

When to use Enemy FOV Cone Detection Angle Check

Use Enemy FOV Cone Detection Angle Check when you need to evaluate the supplied records under the calculation and evidence rules below. No ray casting, occlusion detection or 3 D view cone is performed.

Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.

How to use Enemy FOV Cone Detection Angle Check and understand its results

  1. Prepare the supplied game state, observations and explicit variant settings. Follow the card, board, coordinate and state conventions in the calculation rules.
  2. Enter observerToTargetVector, observerForwardVector, callerFullFovDegrees, callerDetectionRange, lineOfSightDeclaredClear using the field table and calculation rules, then run the tool.
  3. Read targetDistance, signedTargetAngleDegrees, insideCallerFovAndRange, detectableUnderDeclaredLineOfSight. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
observerToTargetVectorObserver to target vectorlist of numberRequired
observerForwardVectorObserver forward vectorlist of numberRequired
callerFullFovDegreesCaller full fov degreesnumberRequired
callerDetectionRangeCaller detection rangenumberRequired
lineOfSightDeclaredClearLine of sight declared clearbooleanRequired

Enter two-component forward and relative-target vectors, nonzero forward, full angle 0–360, nonnegative range and line-of-sight boolean. Use scaled vectors for the signed angle; return distance and inclusive angle/range/detection flags.

angle=atan2(cross(forward,target),dot(forward,target)); detected=angleGate and rangeGate and LOS

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
targetDistanceTarget distancenumber
signedTargetAngleDegreesSigned target angle degreesnumber
insideCallerFovAndRangeInside caller fov and rangeboolean
detectableUnderDeclaredLineOfSightDetectable under declared line of sightboolean
json
{
  "input": {
    "observerToTargetVector": [
      10,
      0
    ],
    "observerForwardVector": [
      1,
      0
    ],
    "callerFullFovDegrees": 90,
    "callerDetectionRange": 20,
    "lineOfSightDeclaredClear": true
  },
  "output": {
    "targetDistance": 10,
    "signedTargetAngleDegrees": 0,
    "insideCallerFovAndRange": true,
    "detectableUnderDeclaredLineOfSight": true
  }
}

Limitations and assumptions

No ray casting, occlusion detection or 3 D view cone is performed.

Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Numeric lists are limited to 10,000 entries; string lists to 128 strings of at most 128 characters each. The rules above may impose smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.

Alternative or Complementary methods

Use Projectile Lead Intercept Angle Estimate: Projectile interception solves for a future target position reachable at a constant projectile speed. The earliest admissible root matters. For a complementary task, use Boss Leash Range Reset Distance Check: A boss leash compares current distance with a caller boundary. Whether equality resets is an explicit policy.

References

  1. Enemy FOV Cone Detection Angle Check — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies