Version:

Vegetation Slope Alignment Modifier 组件

使用 Slope Alignment Modifier 组件将植被或障碍物实例的方向与底层地形对齐。 使用梯度来控制和改变植被对齐。默认情况下,此组件配置为始终将植被实例与 terrain 的坡度完全对齐。 通过将对齐系数设置为小于 ‘1’ 的值,实例将仅与 terrain 部分对齐。

提供者

Vegetation Gem

依赖

使用 Vegetation Slope Alignment Modifier 组件时,添加以下必需组件之一:

Vegetation Slope Alignment Modifier 属性

Vegetation Slope Alignment Modifier component properties

属性说明默认值
Allow Per-Item Overrides如果为 ‘Enabled’,则启用的植被描述符属性可以覆盖此组件的属性。BooleanDisabled
Alignment Coefficient Min设置最小坡度对齐系数。Float: 0.0 - 11.0
Alignment Coefficient Max设置最大坡度对齐系数。Float: 0.0 - 11.0
Gradient请参阅下面的 Gradient 属性

Gradient 属性

Gradient properties

属性说明默认值
Gradient Entity Id设置具有活动 Gradient 组件的实体。EntityNone
Opacity设置输入渐变的不透明度。Float: 0.0 - 1.01.0
Invert Input反转输入渐变的值。BooleanDisabled
Preview (Inbound)显示 Gradient Entity Id 中的实体集提供的渐变。
Enable Transform如果为 ‘Enabled’,则可以修改输入渐变的平移、缩放和旋转。BooleanDisabled
Translate设置输入渐变的平移。Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Scale设置输入渐变的比例。Vector3: 0.0 to InfinityX:1.0, Y:1.0, Z:1.0
Rotate设置输入渐变的旋转。Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Enable Levels如果为 ‘Enabled’,则可以修改渐变的输入和输出值。BooleanDisabled
Input Mid设置输入渐变的中值。Float: 0.0 - 1.01.0
Input Min设置输入渐变的最小值。Float: 0.0 - 1.00.0
Input Max设置输入渐变的最大值。Float: 0.0 - 1.01.0
Output Min设置输出渐变的最小值。Float: 0.0 - 1.00.0
Output Max设置输出渐变的最大值。Float: 0.0 - 1.01.0

SlopeAlignmentModifierRequestBus

将以下请求函数与 ‘SlopeAlignmentModifierRequestBus’ 事件总线接口结合使用,以便与游戏中的 Vegetation Slope Alignment Modifier 组件进行通信。

方法名称说明参数返回值可脚本化
GetAllowOverrides返回 Allow Per-Item Overrides 属性的配置。NoneBooleanYes
GetGradientSampler返回缩放修饰符的渐变采样器对象。NoneGradient SamplerYes
GetRangeMax返回 Alignment Coefficient Max 属性的值。NoneFloatYes
GetRangeMin返回 Alignment Coefficient Min 属性的值。NoneFloatYes
SetAllowOverrides设置 Allow Per-Item Overrides 属性的配置。BooleanNoneYes
SetRangeMax设置 Alignment Coefficient Max 属性。FloatNoneYes
SetRangeMin设置 Alignment Coefficient Min 属性。FloatNoneYes