可行走斜面

解释 Walkable Slope Override,以及在何种情况下会使用到它。

Choose your operating system:

Windows

macOS

Linux

利用 物理形体 上的 可行走斜面重写(Walkable Slope Override) 可对 角色 能行走的表面进行调整。楼梯可能过于陡峭,或需要设置"禁止践踏青草"标示时,以下设置将助您实现功能。

用法

Character Movement 组件 拥有一个名为 Walkable Floor Angle 的属性。它默认约 45 度。因此当角色尝试向大于此角度的表面移动时,角色将无法爬上斜坡,或将失足滑落。

基于所在的编辑器(或者在查看关卡中的一个 Actor),将找到一个以 Override Walkable Slope 为前缀的属性或可扩展属性组。在此可对 Walkable Slope Behavior Walkable Slope Angle 进行设置。

walkableProps.png

增加可行走斜面

此设置将把 物理形体 的可行走斜面增加到 Walkable Slope Angle 属性中列出的数值。如 Walkable Slope Angle 设为 75,则 物理形体 的表面角度为 65,角色将可以走上这个斜面(无视 Walkable Floor Angle )。

Walkable Slope Behavior 被设为 "Increase Walkable Slope"时:

  • Walkable Slope Angle 的 0.0 数值和 Walkable Slope Behavior 属性中的 No Change 本质相同。

  • Walkable Slope Angle 的数值为 90.0,角色可以走过物理形体上小于 90 度的任何角度(不包括 90 度)。

减小可行走斜面

此设置将把 物理形体 的可行走斜面"限定"到 Walkable Slope Angle 属性中列出的数值。如 Walkable Slope Angle 设为 25,则 物理形体 的表面角度为 35,角色将无法走上这个斜面(无视 Walkable Floor Angle )。

Walkable Slope Behavior 被设为 "Decrease Walkable Slope"时:

  • Walkable Slope Angle 的数值为 0.0,角色将无法走过 物理形体 表面。此设置可能会在接近于平面的表面上形成一些奇怪的行为,角色将滑过这些表面但无法改变方向。

  • Walkable Slope Angle 的 90.0 数值和 Walkable Slope Behavior 属性中的 No Change 本质相同。

范例

increased1.png

Decreased1.png

蓝色角度为默认 Character Movement 组件可行走地面角度 ,而绿色代表新 增加的可行走斜面 角度。

蓝色角度为默认 Character Movement 组件可行走地面角度 ,而红色代表新 减小的可行走斜面 角度。

欢迎帮助改进虚幻引擎文档!请告诉我们该如何更好地为您服务。
填写问卷调查
取消