Skip to content

CapsuleMesh

Inherits: PrimitiveMesh < Mesh < Resource < RefCounted < Object

Class representing a capsule-shaped PrimitiveMesh.

Class representing a capsule-shaped PrimitiveMesh.

Type Name Default
float height 2.0
int radial_segments 64
float radius 0.5
int rings 8

height

float height = 2.0

Total height of the capsule mesh (including the hemispherical ends).

Note: The height of a capsule must be at least twice its radius. Otherwise, the capsule becomes a circle. If the height is less than twice the radius, the properties adjust to a valid value.

radial_segments

int radial_segments = 64

Number of radial segments on the capsule mesh.

radius

float radius = 0.5

Radius of the capsule mesh.

Note: The radius of a capsule cannot be greater than half of its height. Otherwise, the capsule becomes a circle. If the radius is greater than half of the height, the properties adjust to a valid value.

rings

int rings = 8

Number of rings along the height of the capsule.