collisionShape property

Shape get collisionShape

The matching physics collision shape. A straight cylinder (equal radii) maps to a CylinderShape; a cone or truncated cone maps to the convex hull of its two end rings (a zero-radius end collapses to its apex point), since there is no analytic cone collision primitive.

Implementation

Shape get collisionShape => cylinderCollisionShape(
  bottomRadius: _bottomRadius,
  topRadius: _topRadius,
  height: _height,
  radialSegments: _radialSegments,
);