PolyCapsule2D

Inherits: PolyNode2D < Node2D < CanvasItem < Node < Object

A capsule PolyNode2D shape.

Description

Builds a polygon outline closely approximating a capsule in 2D (also known as “stadium”).

Properties

float height 64.0
float max_error 0.25
float radius 32.0

Property Descriptions

Default 64.0
Setter set_height(value)
Getter get_height()

Capsule’s total height. When height == 0.0, then a circle is generated instead.


Default 0.25
Setter set_max_error(value)
Getter get_max_error()

Represents the maximum gap in pixels allowed between capsule’s half circle segment and the boundary of the mathematical circle, with low values increasing the accuracy.


Default 32.0
Setter set_radius(value)
Getter get_radius()

Capsule’s semicircle radius, applies to both ends.