using Unity.Mathematics; namespace ProjectM.Simulation { /// /// Pure helpers for the LANTERN "light is territory" relevancy prototype (Build Spec Phase 1 step 8): an entity /// outside a player's lamp radius isn't replicated to that player. The decision is a planar (XZ) distance test /// so it's Burst-safe + unit-testable independent of the netcode GhostRelevancy set manipulation. /// public static class LightRelevancyMath { /// Prototype lamp radius (world units). Per-player dim/bright (a variable radius = the quiet/blind /// trade) is the tuning follow-up; the prototype uses one fixed radius to prove the gamma test. public const float LampRadiusDefault = 25f; /// True when the ghost at is OUTSIDE the lamp centred on /// (planar XZ distance beyond the radius) — i.e. hidden from that player. public static bool IsHidden(float3 playerPos, float3 ghostPos, float radiusSq) => math.distancesq(playerPos.xz, ghostPos.xz) > radiusSq; } }