self = physics.Space:resizeActiveHash(dim, count)
Parameter |
Type |
Description |
---|---|---|
self |
in physics.Space |
The input simulation Space |
dim |
in number |
The length of one side of a hash cell. Default is 100 count |
count |
in number |
The number of cells in the hash table. Default is 1000 |
self |
out physics.Space |
The input Space is returned as the output |
The spatial hash
of active Shapes can be tuned to
improve collision detection. dim establishes
the size of a hash cell
(default 100), and count sets the number of hash cells (default 1000).
dim should approximate the side length of a typical Shape. A good rule of
thumb is to set count to about ten times the number of Shapesin the space.
.Introduced in platform.apiLevel = '2.0'