Version:

Cylinder Shape 组件

Cylinder Shape 组件创建一个以局部 Z 轴为导向的透明圆柱体。圆柱体的尺寸可以使用 HeightRadius 属性进行编辑。Cylinder Shape (圆柱体形状) 组件不是网格,而是一个辅助几何体,可用于定义生成器、形状渐变、音频、植被、PhysX 以及任何可利用形状事件总线的应用程序的体积。有关使用 Shape 组件的更多信息,请参阅 Shape 组件

提供者

O3DE Core (LmbrCentral) Gem

Cylinder Shape 属性

Capsule Shape component properties

属性说明默认值
Visible启用此选项可始终在视区中显示形状,即使未选择实体也是如此。禁用可在未选择实体时隐藏形状。BooleanEnabled
Game View启用此选项可在游戏模式下显示形状。BooleanDisabled
Filled启用此选项可将形状显示为已填充。 禁用以将形状显示为线框。BooleanEnabled
Shape Color形状的颜色。每通道颜色 8 位: 0-255255,255,199
Height形状的高度(以米为单位)。0.0 to Infinity1.0
Radius形状的半径(以米为单位)。0.0 to Infinity0.5

CylinderShapeComponentRequestsBus

将以下请求函数与 ‘CylinderShapeComponentRequestsBus’ 事件总线接口结合使用,以便与游戏中的圆柱体形状组件进行通信。

方法名称说明参数返回值脚本化
GetCylinderConfiguration返回圆柱体形状的配置。NoneCylinderShapeConfig 对象,其中包含 ‘Height’ 和 ‘Radius’ 属性。Yes
SetHeight设置圆柱体形状的 HeightHeight: FloatNoneYes
SetRadius设置圆柱体形状的 RadiusRadius: FloatNoneYes

请参阅 Shape 组件 Ebus 接口 以获取所有 Shape 组件可用的功能说明。