SpatialGrid Class

Simple spatial partitioning grid for efficient area/point/ray queries. Stores entities by their bounding rectangle. Not used for physics (Box2D handles that); useful for gameplay queries like "find all enemies near this point".

public class SpatialGrid

Inheritance System.Object → SpatialGrid

Constructors
SpatialGrid(int) Simple spatial partitioning grid for efficient area/point/ray queries. Stores entities by their bounding rectangle. Not used for physics (Box2D handles that); useful for gameplay queries like "find all enemies near this point".