Lightweight math helpers shared by spawner flows (global/region/wave) and the executor. Uses squared-distance comparisons for performance and XZ-planar checks to ignore height.
More...
|
| static bool | WithinRangeXZ (Vector3 a, Vector3 b, float r) |
| | Determines whether two world positions are within a specified planar (XZ) radius of each other. Ignores the Y axis for performance and to avoid false negatives due to height differences.
|
| |
| static bool | CirclesOverlapXZ (Vector3 centerA, float radiusA, Vector3 centerB, float radiusB) |
| | Tests whether two planar (XZ) circles overlap or touch. Useful for quick prefilters like "spawnpoint center (with its local range) vs player cull circle".
|
| |
Lightweight math helpers shared by spawner flows (global/region/wave) and the executor. Uses squared-distance comparisons for performance and XZ-planar checks to ignore height.
◆ CirclesOverlapXZ()
| static bool MegaCrush.Spawner.SpawnMath.CirclesOverlapXZ |
( |
Vector3 | centerA, |
|
|
float | radiusA, |
|
|
Vector3 | centerB, |
|
|
float | radiusB ) |
|
static |
Tests whether two planar (XZ) circles overlap or touch. Useful for quick prefilters like "spawnpoint center (with its local range) vs player cull circle".
- Parameters
-
| centerA | First circle center (world position). |
| radiusA | First circle radius in world units. |
| centerB | Second circle center (world position). |
| radiusB | Second circle radius in world units. |
- Returns
true if the circles overlap or touch; otherwise false.
◆ WithinRangeXZ()
| static bool MegaCrush.Spawner.SpawnMath.WithinRangeXZ |
( |
Vector3 | a, |
|
|
Vector3 | b, |
|
|
float | r ) |
|
static |
Determines whether two world positions are within a specified planar (XZ) radius of each other. Ignores the Y axis for performance and to avoid false negatives due to height differences.
- Parameters
-
| a | First world position. |
| b | Second world position. |
| r | Radius to compare against, in world units. |
- Returns
true if the squared distance between a and b on the XZ plane is less than or equal to r squared; otherwise false.
The documentation for this class was generated from the following file:
- D:/projects/Asset Store Packages/com.megacrush.runtimespawner/Code/Runtime/Utils/SpawnMath.cs