Collider3D constructor

Collider3D({
  1. ColliderShape3D shape = ColliderShape3D.box,
  2. Vector3? size,
  3. double radius = 0.5,
  4. double height = 2.0,
  5. String model = '',
  6. String meshName = '',
  7. List<double>? heights,
  8. int heightFieldSize = 0,
  9. double cellSize = 1.0,
  10. Vector3? offset,
  11. Vector3? rotation,
  12. Vector3? scale,
})

A 1 m box, by default.

Implementation

Collider3D({
  this.shape = ColliderShape3D.box,
  Vector3? size,
  this.radius = 0.5,
  this.height = 2.0,
  this.model = '',
  this.meshName = '',
  List<double>? heights,
  this.heightFieldSize = 0,
  this.cellSize = 1.0,
  Vector3? offset,
  Vector3? rotation,
  Vector3? scale,
}) : size = size ?? Vector3(1, 1, 1),
     heights = heights ?? <double>[],
     offset = offset ?? Vector3.zero(),
     rotation = rotation ?? Vector3.zero(),
     scale = scale ?? Vector3(1, 1, 1);