PoissonDiskSampling
Inherits: RefCounted
Generates uniformly distributed 2D points with minimum distance (Poisson Disk Sampling).
Used by: MapGenerator to distribute obstacles/objects on the map.
Methods
Array[ |
run_PDS(radius: |
Method Descriptions
Array[Vector2] run_PDS(radius: float, width: int, height: int, n_sample: int) 🔗
Generates random points spaced between radius and 2radius.
radius - minimum distance between points
width - valid area width
height - valid area height
n_sample - attempts per spawn point
Returns Array of Vector2 valid points