addCapsule method

int addCapsule(
  1. int body,
  2. double halfHeight,
  3. double radius, {
  4. Vec3 position = Vec3.zero,
  5. Quat rotation = Quat.identity,
})

Adds a capsule collider along Y: halfHeight of cylinder between the two half-spheres' centres on each side of its middle. See addBox.

Implementation

int addCapsule(
  int body,
  double halfHeight,
  double radius, {
  Vec3 position = Vec3.zero,
  Quat rotation = Quat.identity,
}) => _addCollider(body, FpShapeKind.FP_SHAPE_KIND_CAPSULE, halfHeight, radius, 0, position, rotation);