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.

CylinderShape3D

繼承: Shape3D < Resource < RefCounted < Object

用於物理碰撞的 3D 圓柱體形狀。

說明

3D 膠囊形狀,旨在用於物理學。通常用於為 CollisionShape3D 提供形狀。

注意:圓柱體碰撞形狀有若干已知的問題。建議改用 CapsuleShape3DBoxShape3D

性能:CylinderShape3D 可以快速檢查碰撞,但比 CapsuleShape3DBoxShape3DCylinderShape3D 慢。

教學

屬性

float

height

2.0

float

radius

0.5


屬性說明

float height = 2.0 🔗

  • void set_height(value: float)

  • float get_height()

圓柱體的高度。


float radius = 0.5 🔗

  • void set_radius(value: float)

  • float get_radius()

圓柱體的半徑。