CapsuleShape3D

Hereda: Shape3D < Resource < RefCounted < Object

Una forma de cápsula 3D utilizada para colisiones físicas.

Descripción

Una forma de cápsula 3D, para ser usada en física. Normalmente usada para proveer una forma para un CollisionShape3D.

Rendimiento: CapsuleShape3D es rápida para comprobar colisiones. Es más rápida que CylinderShape3D, pero más lenta que SphereShape3D y BoxShape3D.

Tutoriales

Propiedades

float

height

2.0

float

mid_height

float

radius

0.5


Descripciones de Propiedades

float height = 2.0 🔗

  • void set_height(value: float)

  • float get_height()

The capsule's full height, including the hemispheres.

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


float mid_height 🔗

  • void set_mid_height(value: float)

  • float get_mid_height()

La altura de la cápsula, excluyendo los hemisferios. Esta es la altura de la parte cilíndrica central en el medio de la cápsula, y es la distancia entre los centros de los dos hemisferios. Esto es un envoltorio para height.


float radius = 0.5 🔗

  • void set_radius(value: float)

  • float get_radius()

The capsule's radius.

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