Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

CapsuleShape2D

继承: Shape2D < Resource < RefCounted < Object

用于物理碰撞的 2D 胶囊形状。

描述

2D 胶囊形状,旨在用于物理学。通常用于为 CollisionShape2D 提供形状。

性能:CapsuleShape2D 可以快速检查碰撞,但比 RectangleShape2DCircleShape2D 慢。

属性

float

height

30.0

float

radius

10.0


属性说明

float height = 30.0 🔗

  • void set_height(value: float)

  • float get_height()

胶囊体的高度。


float radius = 10.0 🔗

  • void set_radius(value: float)

  • float get_radius()

胶囊体的半径。