Contents

generateCapsule(height:radius:)

Creates a capsule shape with the specified height and radius.

Declaration

@MainActor @preconcurrency static func generateCapsule(height: Float, radius: Float) -> ShapeResource

Parameters

  • height:

    The height of the capsule including the spherical caps in meters, measured along the local y-axis.

  • radius:

    The radius of the capsule in meters.

Return Value

The new capsule.

Discussion