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.
Checking the stable version of the documentation...
CapsuleShape3D
继承: Shape3D < Resource < RefCounted < Object
用于物理碰撞的 3D 胶囊形状。
描述
3D 胶囊形状,旨在用于物理学。通常用于为 CollisionShape3D 提供形状。
性能:CapsuleShape3D 可以快速检查碰撞。比 CylinderShape3D 快,但比 SphereShape3D 和 BoxShape3D 慢。
教程
属性
|
||
|
属性说明
胶囊体的总高度,包括半球。
注意:胶囊体的 height 必须至少为其 radius 的两倍。否则,胶囊体将变为球体。如果 height 小于 radius 的两倍,则属性将调整为有效值。
胶囊的高度,不包括两个半球。这是胶囊中间圆柱部分的高度,即两个半球球心之间的距离。这是对 height 的封装。
胶囊体的半径。
注意:胶囊体的 radius 不能大于其 height 的一半。否则,胶囊体将变为球体。如果 radius 大于 height 的一半,则属性将调整为有效值。