Version:

Vegetation Rotation Modifier 组件

使用 Vegetation Rotation Modifier 组件向关卡中的植被实例添加变化。 使用渐变来控制植被或阻碍者实例在 X、Y 或 Z 轴上单独旋转的方式。默认情况下,此组件配置为在 Z 轴上向任一方向将植被实例旋转最多 180 度。

提供者

Vegetation Gem

依赖

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

Vegetation Rotation Modifier 属性

Vegetation Rotation Modifier component properties

属性说明默认值
Allow Per-Item Overrides如果为 ‘Enabled’,则启用的植被描述符属性可以覆盖此组件的属性。BooleanDisabled
Rotation X - Range Min设置 Vegetation 实例在 X 轴上的最小修改旋转。Float: -Infinity to Infinity0.0
Rotation X - Range Max设置 Vegetation 实例在 X 轴上的最大修改旋转。Float: -Infinity to Infinity0.0
Rotation X - Gradient请参阅下面的 Gradient 属性
Rotation Y - Range Min设置 Vegetation 实例在 Y 轴上的最小修改旋转。Float: -Infinity to Infinity0.0
Rotation Y - Range Max设置 Vegetation 实例在 Y 轴上的最大修改旋转。Float: -Infinity to Infinity0.0
Rotation Y - Gradient请参阅下面的 Gradient 属性
Rotation Z - Range Min设置 Vegetation 实例在 Z 轴上的最小修改旋转。Float: -Infinity to Infinity-180.0
Rotation Z - Range Max设置 Z轴上植被实例的最大修改旋转。Float: -Infinity to Infinity180.0
Rotation Z - 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

RotationModifierRequestBus

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

方法名称说明参数返回值可脚本化
GetAllowOverrides返回 Allow Per-Item Overrides 属性的配置。NoneBooleanYes
GetGradientSamplerX返回 Rotation X 组属性的渐变采样器对象。NoneGradient SamplerYes
GetGradientSamplerY返回 Rotation Y 组属性的渐变采样器对象。NoneGradient SamplerYes
GetGradientSamplerZ返回 Rotation Z 组属性的渐变采样器对象。NoneGradient SamplerYes
GetRangeMax返回 Range Max 属性的 Vector3。NoneVector3: (Rotation X - Range Max, Rotation Y - Range Max, Rotation Z - Range Max)Yes
GetRangeMin返回 Range Min 属性的 Vector3。NoneVector3: (Rotation X - Range Min, Rotation Y - Range Min, Rotation Z - Range Min)Yes
SetAllowOverrides设置 Allow Per-Item Overrides 属性的配置。BooleanNoneYes
SetRangeMax设置 X、Y 和 Z Range Max 属性。Vector3: (Rotation X - Range Max, Rotation Y - Range Max, Rotation Z - Range Max)NoneYes
SetRangeMin设置 X、Y 和 Z Range Min 属性。Vector3: (Rotation X - Range Min, Rotation Y - Range Min, Rotation Z - Range Min)NoneYes