Category: 2D Game Physics (Pro)
PhysicsCollisionCount(world As Integer)
Integer
Returns the number of body pairs recorded during the most recent physics step.
Collision indices are zero-based and remain valid until the next physics step. Recording is capped at 65,536 pairs per step to bound memory use; every detected contact is still resolved.
Pro feature: compiling code that uses this function requires a license with the GamePhysics feature enabled.
For i = 0 To PhysicsCollisionCount(world) - 1
DebugPrint Str(PhysicsCollisionBodyA(world, i))
Next