Version:

Slope Gradient 组件

添加Slope Gradient组件,从坡度范围生成归一化梯度。 输出的梯度可选择受曲面标记的限制。

提供者

Gradient Signal Gem

Slope Gradient 属性

Slope Gradient component properties

属性说明默认值
Preview显示该组件应用所有属性后的输出渐变效果。
Pin Preview to Shape如果Constrain to ShapeEnabled,则设置一个具有兼容形状组件的实体作为预览的边界。EntityIdCurrent Entity
Preview Position设置预览的世界位置。

只有在Pin Preview to Shape中未选择实体时,该字段才可用。
Vector3: -Infinity to InfinityX:0.0, Y:0.0, Z:0.0
Preview Size设置预览的尺寸。Vector3: 0.0 to InfinityX:1.0, Y:1.0, Z:1.0
Constrain to Shape如果Enabled,渐变预览将使用在Pin Preview to Shape中选择的实体的边界。

此字段仅在Pin Preview to Shape中选择了实体时可用。
BooleanDisabled
Surface Tags to tracksurface tags的可选数组。 该组件只在存在这些表面标记的地方生成梯度。Array: Surface TagsNone
Slope Min设置产生梯度值的最小表面坡度角。Float: 0.0 - 90.00.0
Slope Max设置产生梯度值的最大表面坡度角。Float: 0.0 - 90.020.0
Ramp Type设置斜率范围之间的内插函数。Linear Ramp Down, Linear Ramp Up, 或 Smooth StepLinear Ramp Down
Smooth Step Settings请参阅下面的 Smooth Step Settings 属性

Smooth Step Settings 属性

Smooth Step Settings属性仅适用于Ramp Type Smooth Step

属性说明默认值
Falloff Midpoint设置衰减值的中点。Float: 0.0 - 1.00.5
Falloff Range设置衰减范围。Float: 0.0 - 1.00.5
Falloff Softness设置应用于衰减值的平滑量。Float: 0.0 - 1.00.25

SurfaceSlopeGradientRequestBus

将以下请求函数与SurfaceSlopeGradientRequestBus EBus 接口结合使用,可与游戏中的斜率渐变组件进行通信。

方法名称说明参数返回值脚本化
AddTagSurface Tags to track数组中添加一个曲面标记。Surface Tag: StringNoneYes
GetNumTags返回Surface Tags to track数组中标签的数量。NoneCount: IntegerYes
GetRampType返回 Ramp Type 属性的值。NoneRamp Type Index: IntegerYes
GetSlopeMax返回 Slope Max 属性的值。NoneFloatYes
GetSlopeMin返回 Slope Min 属性的值。NoneFloatYes
GetTag返回Surface Tags to track数组中指定索引处的表面标签。Surface Tag Index: IntegerSurface Tag: StringYes
RemoveTag删除Surface Tags to track数组中指定索引处的表面标签。Surface Tag Index: IntegerNoneYes
SetRampType设置 Ramp Type 属性的值。Ramp Type Index: IntegerNoneYes
SetSlopeMax设置 Slope Max 属性的值。FloatNoneYes
SetSlopeMin设置 Slope Min 属性的值。FloatNoneYes