CollisionResolverSystem<T extends App<T>> constructor

CollisionResolverSystem<T extends App<T>>(
  1. T app, {
  2. bool populateDefaults = true,
  3. double restitution = _defaultRestitution,
  4. double gridCellSize = _defaultGridCellSize,
  5. bool enableEventEmitting = true,
})

Implementation

CollisionResolverSystem(super.app, {
  super.populateDefaults,
  this.restitution = _defaultRestitution,
  this.gridCellSize = _defaultGridCellSize,
  this.enableEventEmitting = true,
}) {
  // Cell size should be roughly 2x your largest collider radius
  // For 8-radius balls, 20-32 is a good default
  spatialGrid = .new(gridCellSize);
}