Unit selection  单位选择

From League of Legends Wiki, LoL Wiki
Jump to navigation Jump to search

Unit selection occurs when the player points the cursor anywhere within a unit's selection area, which highlights its visual model. Each unit has a unique selection area that may be disabled and invalidated by it becoming untargetable.
当玩家的光标指向单位的选择区域内的任何位置时,会发生单位选择,并高亮显示其视觉模型。每个单位都有独特的选择区域,当其变为 不可选择时,该区域可能会被禁用和作废。

Only one unit can be selected at any given time. Selection is relevant for unit-targeted spells—most commonly, the basic attack—and for focusing a unit (default Left Mouse Button / MB1) to reveal its target frame at the top left corner of the screen.
在任何时候,只能选择一个单位。选择与单位目标法术有关——最常见的是基础攻击——以及聚焦单位(默认 Left Mouse Button / MB1)以在屏幕左上角显示其目标框。

Gameplay takes place almost entirely in two dimensions, specifically the ground plane which is independent from the game's visuals. The behavior of selecting a unit however is closely related to the camera's perspective and individual units' three-dimensional graphics. These elements warrant the implementation of an efficient and consistent system for unit selection, with the goal of matching player expectations particularly around combat. The third dimension is referred to as the 'height' or the 'vertical' dimension and it is perpendicular to the ground plane.
游戏进行几乎完全在二维平面上进行,具体是指独立于游戏视觉效果的地面平面。然而,单位选择的行为与摄像机的视角和个别单位的三维图形密切相关。这些元素需要实施一个高效且一致的单位选择系统,目标是满足玩家的期望,尤其是在战斗方面。第三个维度被称为"高度"或"垂直"维度,它垂直于地面平面。

Constituents[edit | edit source]
构成成分编辑 | 编辑源代码

A unit's total selection area is the sum of three different types of areas, spanning four areas total. These areas are defined based on the unit's bounding box. See the next section for information on bounding boxes.
单位的总选择区域是由四个区域组成的三种不同类型区域的总和。这些区域是根据单位的边界框定义的。有关边界框的更多信息,请参见下一节。

  1. The visual model itself. Any part of the model within the unit's bounding box is valid.
    视觉模型本身。模型在单位边界框内的任何部分都是有效的。
  2. Two identical horizontal sufaces. Both areas are discs, parallel to the ground, centered at the unit's height axis, and they have a radius equal to the unit's selection radius. The lower selection disc is located at the bottom of the unit's bounding box. The upper selection disc is located higher at a distance equal to the unit's selection height.
    两个相同的水平表面。这两个区域都是圆盘,与地面平行,以单位高度轴为中心,半径等于单位的 选择半径。较低的选择圆盘位于单位边界框的底部。较高的选择圆盘位于更高的位置,距离等于单位的 选择高度。
  3. The vertical surface. It is a hemispheroid.[1] Its circular base is the lower selection disc and its height semiaxis' length is equal to the unit's selection height.
    垂直表面是一个半球体。 [1] 其圆形底部是下方的选择圆盘,其高度半轴的长度等于单位的 选择高度。

Behavior[edit | edit source]
行为编辑 | 编辑源代码

Bounding box[edit | edit source]
边界框编辑 | 编辑源代码

The axis-aligned bounding box ("AABB") of a unit is the smallest rectangular cuboid[2] that contains its visual model, and the bases of which are always parallel to the ground.[3] Bounding boxes are relevant for various gameplay mechanics; this article only pertains to its interactions with units' selection area.
单位的轴对齐边界框("AABB")是包含其视觉模型的最小矩形长方体 [2] ,其底面始终与地面平行。 [3] 边界框与各种游戏机制相关;本文仅涉及其与单位选择区域的交互。

In League of Legends, this definition of the bounding box is only theoretically true, because the game normalizes every unit's bounding box such that:
在《英雄联盟》中,这种边界框的定义理论上是正确的,因为游戏将每个单位的边界框标准化,使得:

  1. the dimensions of the bases are averaged: effectively, the rectangular bases are transformed into squares of the same area, and
    基础尺寸被取平均值:实际上,矩形基础被转换为面积相同的正方形,并且
  2. the box's height symmetry axis becomes the same as the unit's height axis: effectively, the bounding box is always centered on the unit's center, regardless of the visual model's properties, animations, or movement.
    边界框的高度对称轴与单位的高度轴相同:实际上,无论视觉模型的属性、动画或移动如何,边界框始终居中于单位的中心。

The real bounding box therefore only approximately contains the unit's model, causing some parts of it to be exterior to the bounding box. A consequence of this is relevant for selecting a unit's visual model specifically.
实际的边界框仅大致包含单位的模型,导致一些部分位于边界框外。这对于特定选择单位的视觉模型具有相关性。

Map view & selection[edit | edit source]
地图视图和选择编辑 | 编辑源代码

The player views the three-dimensional world from an isometric perspective and the camera may be panned around to view the various areas of the map.
玩家从等轴视角观察三维世界,并且可以通过移动相机来查看地图的各个区域。

In order to select a point in the world, the game casts a ray from the cursor's apex at the current viewing angle of the pointed area. The ray will travel until it finds a valid unit's selection area or the ground. At a certain point during its path, the ray will diverge and check for units in the area directly below it in the height axis. The game will select the first detected point that is part of a unit's bounding box and intersects the ray. This is what allows the selection of units whenever pointing at any part of their model; however, this is only a general rule due to the bounding box's normalization, which can cause some parts of the model to be excluded from the bounding box and thus not be selectable.
为了选择世界中的一个点,游戏会从当前视角指向区域的光标顶点投射一条光线。这条光线将持续移动,直到找到有效单位的选择区域或地面。在移动路径的某个点,光线会发散并检查其高度轴正下方的单位。游戏将选择第一个被检测到并与光线相交的单位包围盒上的点。这使得可以选择模型的任何部分;但由于包围盒的标准化,这只是一个通用规则,可能会导致模型的某些部分被排除在包围盒之外,从而无法选择。

If a unit's model is not found, the ray checks for the existence of any other selection surfaces. The game selects the first detected point on the horizontal or vertical selection surfaces of a unit that intersects the ray. If yet again no selection area is found, the ray ends its travel by meeting and selecting the ground.
如果未找到单位模型,光线会检查是否存在其他选择面。游戏会选择与光线相交的第一个水平或垂直选择面上的点。如果仍然未找到选择区域,则光线将在接触并选择地面时结束其路径。

Lastly, the selected unit's health bar is always brought to the foreground.
最后,被选中单位的血条将始终置于最前端。

The complete obstruction of a unit's selection area by another unit becomes more difficult and unlikely when considering the following:
考虑到以下情况,一个单位的选择区域被另一个单位完全遮挡变得更加困难和不太可能:

  • The initial check for selection of a unit's model can reliably distinguish between different units' position in the world.
    对单位模型选择的初步检查可以可靠地区分世界中不同单位的位置。
  • The player can pan and/or zoom the camera to reveal different areas of units' model.
    玩家可以平移和/或缩放摄像机,以显示单位模型的不同区域。
  • Different units have different models that may vary in size and many are also made up of complex shapes, including empty spaces.
    不同的单位具有不同的模型,其大小可能会有所不同,而且许多模型由复杂的形状组成,包括空白区域。
  • Unit collision disallows units from occupying the same space in the vast majority of cases.
    单位碰撞机制阻止单位在绝大多数情况下占据相同的空间。

Despite these variables, it is still possible for complete obstruction to occur at certain viewing angles when a unit is sufficiently large, closer to the player's viewing plane than the smaller unit, and the entire selection area of the smaller unit can be contained within the larger unit's selection area.
尽管存在这些变量,但在某些观察角度下,当一个单位足够大,且更靠近玩家的视平面,并且较小单位的整个选择区域被包含在较大单位的选择区域内时,仍然可能发生完全遮挡的情况。

While a unit is selected, issuing a Select/Confirm order (default Left Mouse Button / MB1) for an action that does not require a unit target will cause the game to ignore any units and target the ground according to the cursor's raycast instead.
当一个单位被选中时,发出不需要单位目标的选择/确认命令(默认 Left Mouse Button / 鼠标左键)将导致游戏忽略所有单位,并根据光标的射线投射来选择地面作为目标。

Size modifier interactions[edit | edit source]
尺寸修改器交互

Also see: Unit size  另请参见:单位大小

Size modifiers do not affect all selection areas.
大小修饰符不会影响所有选择区域。

The visual model is scaled by size modifiers (the bounding box is also scaled accordingly).
视觉模型会根据大小修饰符进行缩放(边界框也相应地缩放)。

The selection radius and selection height are not affected by size modifiers; the horizontal and vertical surfaces cannot change.
的选择半径和 的选择高度不受大小修饰符的影响;水平和垂直表面无法改变。

Self-targeting[edit | edit source]
自我选取编辑 | 编辑源

The same selection behavior applies when the player is selecting their own champion, such as for the purposes of self-casting a certain spell. Unlike selection of other units, no outline is visible on the self, and no target frame is valid.
当玩家选择自己的英雄(例如为了自我施法某个法术)时,也适用相同的选择机制。与选择其他单位不同的是,自身不会出现轮廓高亮,也不会显示目标框。

While the player's own champion is selected, issuing a Select/Confirm order (default Left Mouse Button / MB1) which does not require targeting the self will cause the game to ignore any units and target the ground according to the cursor's raycast instead.
当玩家选中自己的英雄时,发出选择/确认指令(默认 Left Mouse Button / 鼠标左键)且不需要指向自身的情况下,游戏将忽略所有单位,并根据光标的射线投射来选择地面。

Selection states[edit | edit source]
选择状态编辑 | 编辑源代码

Model silhouette context[edit | edit source]
模型轮廓上下文编辑 | 编辑源代码

There are various states of selecting a unit, communicated by the existence or absence of an outline / silhouette on the model. This outline is colored in the respective team colors.
选择单位时存在多种状态,通过模型上轮廓的存在或不存在来表示。这个轮廓以相应的队伍颜色标注。

While a unit is selected, the game displays a wide outline on its visual model. While a unit is focused, the game displays a narrow outline on its visual model as well as its target frame at the top left corner of the screen. A unit may be unfocused by issuing a Select order (default Left Mouse Button / MB1) on any point of the map that is not currently occupied by a unit's selection area. Targets are not unfocused if they are affected by untargetability, but they are unfocused when they die.
当一个单位被选中时,游戏会在其视觉模型上显示一个宽大的轮廓。当一个单位被聚焦时,游戏会在其视觉模型上显示一个窄细的轮廓,并在屏幕左上角显示其目标框。通过在地图上任意不被单位选择区域占用的点发出选择命令(默认 Left Mouse Button / 鼠标左键),可以取消选择一个单位。如果目标受到 不可选择效果的影响,则不会取消选择,但当其 死亡时会取消选择。

A selected unit can be focused via the following commands:
可以通过以下命令聚焦已选择的单位:

  • Issuing a Select/Confirm order (default Left Mouse Button / MB1), whether independently of other commands, or upon confirming the target of a used spell. The latter case is inconsistent: not all unit-targeted spells will focus the target and the cause of this behavior is currently unknown.
    发出选择/确认命令(默认 Left Mouse Button / 鼠标左键),无论是独立执行还是在使用技能时确认目标。后一种情况存在不一致性:并非所有的单位目标技能都会聚焦目标,而导致此行为的原因目前尚不清楚。
  • Issuing an Attack order (default Right Mouse Button / MB2) on an enemy unit, if the option to "Show Target Frame on attack" is enabled under Settings > Interface > Ability and Attack Display.
    在设置 > 界面 > 能力和攻击显示中启用"攻击时显示目标框"选项后,对敌方单位发出攻击命令(默认 Right Mouse Button / 鼠标右键)。

With the exception of the independent Select order, issuing any order that targets a unit causes their outline to briefly pulse. This also applies when using Quick cast, since the target is assumed to be the cursor's position, as well as whenever utilizing targeting forgiveness.
除了独立的选择命令外,发出任何针对单位的命令都会使其轮廓短暂地闪烁。这同样适用于使用快速施法,因为目标被视为光标位置,以及使用 定位宽容度时。

Cursor context[edit | edit source]
光标上下文编辑 | 编辑源代码

The cursor has various contexts depending on the type of unit selected and/or player options.
光标的上下文会根据所选单位的类型和/或玩家选项而有所不同。

While an enemy unit is selected, neutral enemies included, the cursor transforms into a sword. While an allied unit is selected, the cursor gem becomes blue.
当选中一个敌方单位,包括中立敌人时,光标会变成一把剑。当选中友军单位时,光标宝石会变为蓝色。

Using the "Target champions only" hotkey causes the cursor to only allow selection of (allied and enemy) champion targets, while ignoring all other units. While the "Target champions only" context is active and no target is selected, the cursor gem becomes red. If the player selects an enemy unit, a circular "target" icon will be added to the cursor, indicating a valid target.
使用"仅选择目标英雄"快捷键会使光标仅允许选择(友军和敌方) 英雄目标,同时忽略所有其他单位。在"仅选择目标英雄"上下文处于活动状态且未选择目标时,光标宝石会变为红色。如果玩家选择了一个敌方单位,将在光标上添加一个圆形的"目标"图标,表示是有效目标。

Selecting a gate displays a unique cursor that has a green gem.
选择一个 门会显示一个带有绿色宝石的独特光标。

List of Units' Selection Radius[edit | edit source]
单位选择半径列表编辑 | 编辑源代码

Champions[edit | edit source]
英雄编辑 | 编辑源代码

Selection radius  选择半径Champion  英雄
150
140
136.11109924316
135
130
125
120
115
111.11109924316
110
108.33329772949
102.77780151367
100

List of Units' Selection Height[edit | edit source]
单位选择高度列表 | 编辑源代码

Champions[edit | edit source]
英雄 | 编辑源代码

Selection height  选择高度Champion  英雄
302.77780151367
300
280
250
240
225
200
191.66670227051
190
188.88890075684
185
183.33000183105
180
177.77780151367
175
170
165
160
155.55560302734
155
150
148.88890075684
145
140
138.88890075684
135
130
125
122.22219848633
122
120
115
110
100
85


References  参考资料

  1. Spheroid on Wikipedia, the free encyclopedia
    ↑ 维基百科上的球体词条,自由的百科全书
  2. Rectangular cuboid on Wikipedia, the free encyclopedia
    ↑ 维基百科上的长方体词条,自由的百科全书
  3. Minimum bounding box on Wikipedia, the free encyclopedia
    ↑ 维基百科上的最小外接盒词条,自由的百科全书