Collisions/zh: Difference between revisions
Content added Content deleted
(Created page with "== 垂直碰撞(Y) ==") |
No edit summary |
||
(33 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
Minecraft 的碰撞 |
Minecraft 的碰撞过程非常简单:游戏中没有光线跟踪碰撞,玩家只是在每一轴上按顺序移动。 |
||
在此提醒,Minecraft的物理更新速度为每秒 20 [[Special:MyLanguage/ticks| |
在此提醒,Minecraft 的物理更新速度为每秒 20 [[Special:MyLanguage/ticks|刻]]。每刻更新一次玩家的移动和碰撞。 |
||
<span id="Collision_Box"></span> |
|||
== 碰撞箱 == |
== 碰撞箱 == |
||
Line 12: | Line 13: | ||
碰撞通常涉及一个实体和一个方块:方块和方块之间通常不会相互碰撞。 |
碰撞通常涉及一个实体和一个方块:方块和方块之间通常不会相互碰撞。 |
||
* 玩家只有一个边界箱,尺寸为 '''0.6'''×'''1.8'''×'''0.6''' m<sup>3</sup>。 |
* 玩家只有一个边界箱,尺寸为 '''0.6'''×'''1.8'''×'''0.6''' m<sup>3</sup>。其的位置(如F3所示)位于底部中心 |
||
* 方块有更复杂的碰撞箱(见[[Special:MyLanguage/Blocks| |
* 方块有更复杂的碰撞箱(见[[Special:MyLanguage/Blocks|此列表]])。 |
||
注意 |
注意:“判定箱”是玩家可以点击的(例如攻击实体、按下按钮、打开门)。它不一定与碰撞箱重叠。 |
||
[[File:Collision box (player and block).png|frameless|720x720px]] |
[[File:Collision box (player and block).png|frameless|720x720px]] |
||
<span id="Collision_Order"></span> |
|||
== 碰撞顺序 == |
== 碰撞顺序 == |
||
每次更新玩家速度后,游戏 |
每次更新玩家速度后,游戏将按照下列步骤检查碰撞: |
||
* 沿 Y 轴移动玩家。如果在向下移动时检测到垂直碰撞,则玩家现在被认定在地面上。 |
* 沿 Y 轴移动玩家。如果在向下移动时检测到垂直碰撞,则玩家现在被认定在地面上。 |
||
* 沿 X 轴移动玩家。 |
* 沿 X 轴移动玩家。 |
||
* 沿 Z 轴移动玩家。 |
* 沿 Z 轴移动玩家。 |
||
* 如果玩家在地面上撞到一堵墙并且墙的高度小于0.6米,他们可以跨过墙。 |
* 如果玩家在地面上撞到一堵墙并且墙的高度小于 0.6 米,他们可以跨过墙。 |
||
** 参见[[Special:MyLanguage/Stepping|跨步]]获取解释和视觉效果。 |
** 参见[[Special:MyLanguage/Stepping|跨步]]获取解释和视觉效果。 |
||
** 该机制造成了[[Special:MyLanguage/Blip|卡角]]与[[Special:MyLanguage/Jump Cancel|跳跃取消]],以及它们的变体。 |
** 该机制造成了[[Special:MyLanguage/Blip|卡角]]与[[Special:MyLanguage/Jump Cancel|跳跃取消]],以及它们的变体。 |
||
Line 35: | Line 37: | ||
<span id="Vertical_Collisions_(Y)"></span> |
|||
== 垂直碰撞 |
== 垂直碰撞(Y) == |
||
在水平移动之前处理垂直移动。 |
在水平移动之前处理垂直移动。因此: |
||
* 玩家可以在跑出一个方块后的 1 刻跳跃。这就是[[Special:MyLanguage/Timings|延立]]的原理。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
* 为了落在方块上,玩家的边界箱必须在跳跃的最后 1 刻必须超过方块。 |
|||
* The player is able to jump one tick after running off a block. In particular, this is why [[Special:MyLanguage/Timings|headhitter timing]] works. |
|||
*To land on a block, the player's bounding box must overlap its surface on the final tick of the jump. |
|||
</div> |
|||
⚫ | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
⚫ | |||
</div> |
|||
当玩家撞到地板或天花板时,其垂直速度将会重置为 0。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
When the player hits a floor or ceiling, their vertical speed is reset to 0. |
|||
</div> |
|||
<span id="Horizontal_Collisions_(X/Z)"></span> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
== 水平碰撞(X/Z) == |
|||
== Horizontal Collisions (X/Z) == |
|||
</div> |
|||
因为 X 轴是在 Z 轴之前处理的,所以与方块边角碰撞的效果因朝向而有所不同。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Due to the X axis being processed before the Z axis, corner collisions don't behave the same depending on the direction. |
|||
</div> |
|||
这一现象在高速状态下尤其明显。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
This phenomenon is especially noticeable with more speed. |
|||
</div> |
|||
⚫ | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
⚫ | |||
</div> |
|||
区分“X”旋转跳和“Z”旋转跳十分重要: |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
It's important to distinguish "X-facing" jumps from "Z-facing" ones: |
|||
</div> |
|||
*'''X''' 指的是指向东/西的跳跃。卡墙是难以避免的,因此玩家必须从离墙更远的地方起跳。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
*'''X-facing''' refers to jumps that point towards East/West. The corner is difficult to avoid, and the player may have to start jumping further back than expected. |
|||
</div> |
|||
*'''Z''' 指的是指向北/南的跳跃。不容易卡墙,甚至可以贴墙延立。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
*'''Z-facing''' refers to jumps that point towards North/South. The corner is easier to avoid, and in particular it's possible to do a hh-timing from the front. |
|||
</div> |
|||
可以通过 [[Special:MyLanguage/Debug Screen|F3]] 查看面向的轴向。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
The axis of a jump can be checked with [[Special:MyLanguage/Debug Screen|F3]]. |
|||
</div> |
|||
玩家往往倾向于面向 Z 的旋转跳更容易,但面向 X 的旋转跳实际上距离更短: |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Players tend to find Z-facing neos more intuitive, but X-facing neos can actually be more lenient: |
|||
</div> |
|||
*Z 轴向的旋转跳非常类似于直线跳跃(假设在最优移动下)。要将一个 Z 轴旋转跳转化为直线跳,只需将其距离增加 1.2,并将其 [[Special:MyLanguage/Tiers|tier]] 增加 1。例如,一个三墙相当于一个“4.2+0.25”(无法建造出来,但这类比较对分析有益)。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
*X 轴向的旋转跳没有等价的直线跳跃。与面向 Z 的旋转跳相比,它们“平移”了 1 刻(墙壁碰撞的开始和结束都提前了 1 刻)。这种转变会减少助跑,但却会让墙变得更短,因为玩家在跳跃结束时的速度通常比开始时更快。 |
|||
*Z-facing neos are very similar to linear jumps (assuming optimal movement). To convert a neo, simply add 1.2 to its distance and increase its [[Special:MyLanguage/Tiers|tier]] by one. For example, a triple neo is equivalent to a "4.2+0.25" (which cannot be built, but this sort of comparison is useful for analysis) |
|||
*X-facing neos don't have a linear equivalent. Compared to Z-facing neos, they are "shifted" by 1 tick (wall collision begins and ends 1 tick earlier). This shift reduces the momentum, but makes it more efficient as the player typically has more speed at the end of a jump than at the start. |
|||
</div> |
|||
某些跳跃只有在一个特定轴向才有可能通过(例如,[https://youtu.be/apWPY4_-Qbg 2bm 三墙] 仅在 X 轴上有解)。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Some jumps are only possible when facing one axis or the other (for example, a [https://youtu.be/apWPY4_-Qbg 2bm triple neo] is only possible X-facing) |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
== 1.14+== |
== 1.14+== |
||
</div> |
|||
1.14 更新了碰撞物理。碰撞顺序现在取决于玩家的速度: |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
In 1.14, the collision physics were updated. The collision order now depends on the player's velocity: |
|||
</div> |
|||
*如果玩家的Z速度大于X速度(绝对值),碰撞顺序为 '''Y-X-Z'''。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
*否则,碰撞顺序为 '''Y-Z-X'''。 |
|||
*If the player has more Z speed than X speed (in absolute value), the collision order is '''Y-X-Z'''. |
|||
*Otherwise, the collision order is '''Y-Z-X'''. |
|||
</div> |
|||
在大多数情况下,所有碰撞现在都类似于 X 轴向。一些需要经过方块边缘的跳跃可能与 1.14 之前的版本大不相同。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
In most cases, all collisions now resemble X-facing. Some jumps which involve cutting corners may be very different compared to pre-1.14. |
|||
</div> |
Latest revision as of 04:51, 16 August 2023
Minecraft 的碰撞过程非常简单:游戏中没有光线跟踪碰撞,玩家只是在每一轴上按顺序移动。
在此提醒,Minecraft 的物理更新速度为每秒 20 刻。每刻更新一次玩家的移动和碰撞。
碰撞箱
一个碰撞箱由一个或多个边界箱组成,边界箱是由最小和最大 X/Y/Z 坐标定义的简单长方体。
碰撞通常涉及一个实体和一个方块:方块和方块之间通常不会相互碰撞。
- 玩家只有一个边界箱,尺寸为 0.6×1.8×0.6 m3。其的位置(如F3所示)位于底部中心
- 方块有更复杂的碰撞箱(见此列表)。
注意:“判定箱”是玩家可以点击的(例如攻击实体、按下按钮、打开门)。它不一定与碰撞箱重叠。
碰撞顺序
每次更新玩家速度后,游戏将按照下列步骤检查碰撞:
- 沿 Y 轴移动玩家。如果在向下移动时检测到垂直碰撞,则玩家现在被认定在地面上。
- 沿 X 轴移动玩家。
- 沿 Z 轴移动玩家。
- 如果玩家在地面上撞到一堵墙并且墙的高度小于 0.6 米,他们可以跨过墙。
垂直碰撞(Y)
在水平移动之前处理垂直移动。因此:
- 玩家可以在跑出一个方块后的 1 刻跳跃。这就是延立的原理。
- 为了落在方块上,玩家的边界箱必须在跳跃的最后 1 刻必须超过方块。
当玩家撞到地板或天花板时,其垂直速度将会重置为 0。
水平碰撞(X/Z)
因为 X 轴是在 Z 轴之前处理的,所以与方块边角碰撞的效果因朝向而有所不同。
这一现象在高速状态下尤其明显。
区分“X”旋转跳和“Z”旋转跳十分重要:
- X 指的是指向东/西的跳跃。卡墙是难以避免的,因此玩家必须从离墙更远的地方起跳。
- Z 指的是指向北/南的跳跃。不容易卡墙,甚至可以贴墙延立。
可以通过 F3 查看面向的轴向。
玩家往往倾向于面向 Z 的旋转跳更容易,但面向 X 的旋转跳实际上距离更短:
- Z 轴向的旋转跳非常类似于直线跳跃(假设在最优移动下)。要将一个 Z 轴旋转跳转化为直线跳,只需将其距离增加 1.2,并将其 tier 增加 1。例如,一个三墙相当于一个“4.2+0.25”(无法建造出来,但这类比较对分析有益)。
- X 轴向的旋转跳没有等价的直线跳跃。与面向 Z 的旋转跳相比,它们“平移”了 1 刻(墙壁碰撞的开始和结束都提前了 1 刻)。这种转变会减少助跑,但却会让墙变得更短,因为玩家在跳跃结束时的速度通常比开始时更快。
某些跳跃只有在一个特定轴向才有可能通过(例如,2bm 三墙 仅在 X 轴上有解)。
1.14+
1.14 更新了碰撞物理。碰撞顺序现在取决于玩家的速度:
- 如果玩家的Z速度大于X速度(绝对值),碰撞顺序为 Y-X-Z。
- 否则,碰撞顺序为 Y-Z-X。
在大多数情况下,所有碰撞现在都类似于 X 轴向。一些需要经过方块边缘的跳跃可能与 1.14 之前的版本大不相同。