withParticleIndices(_:)
Provides access to the indices of particles that collided with the collider.
Declaration
func withParticleIndices<Result>(_ callback: (Span<UInt32>) -> Result) -> ResultParameters
- callback:
A closure that receives a span over the colliding particle indices.
Return Value
The value returned by callback.
Discussion
This span is only available during the subscription callback of this event. The provided span is only valid for the lifetime of the callback.