Collisions/zh: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
(Created page with "碰撞通常涉及一个实体和一个方块:方块和方块之间通常不会相互碰撞。")
No edit summary
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
Minecraft 的碰撞物理非常简单:游戏没有光线踪碰撞,简单地沿轴顺序移动玩家
Minecraft 的碰撞过程非常简单:游戏没有光线踪碰撞,玩家只上按顺序移动。


在此提醒,Minecraft的物理更新速度为每秒 20 [[Special:MyLanguage/ticks|ticks]]。玩家的移动和碰撞每Tick更新一次
在此提醒,Minecraft 的物理更新速度为每秒 20 [[Special:MyLanguage/ticks|]]。每刻更新一次玩家的移动和碰撞。






<span id="Collision_Box"></span>
== 碰撞箱 ==
== 碰撞箱 ==


Line 12: Line 13:
碰撞通常涉及一个实体和一个方块:方块和方块之间通常不会相互碰撞。
碰撞通常涉及一个实体和一个方块:方块和方块之间通常不会相互碰撞。


* 玩家只有一个边界箱,尺寸为 '''0.6'''×'''1.8'''×'''0.6''' m<sup>3</sup>。它们的位置(如F3所示)位于底部中心
* 玩家只有一个边界箱,尺寸为 '''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>
== 碰撞顺序 ==
== 碰撞顺序 ==


每次更新玩家速度后,游戏将按照下列步骤检查碰撞:
<div lang="en" dir="ltr" class="mw-content-ltr">
Every tick, after the player's velocity has been updated, the game does these steps to check collisions:
</div>


* 沿 Y 轴移动玩家。如果在向下移动时检测到垂直碰撞,则玩家现在被认定在地面上。
<div lang="en" dir="ltr" class="mw-content-ltr">
* 沿 X 轴移动玩家。
* Move the player along the Y axis. If a vertical collision is detected while moving downward, the player is now considered to be on ground.
* 沿 Z 轴移动玩家。
* Move the player along the X axis.
* 如果玩家在地面上撞到一堵墙并且墙的高度小于 0.6 米,他们可以跨过墙。
* Move the player along the Z axis.
** 参见[[Special:MyLanguage/Stepping|跨步]]获取解释和视觉效果。
* If the player is on ground and collided with a wall, they are able to step over it if it's less than 0.6m tall.
** See [[Special:MyLanguage/Stepping|Stepping]] for explanations and visuals.
** 该机制造成了[[Special:MyLanguage/Blip|卡角]]与[[Special:MyLanguage/Jump Cancel|跳跃取消]],以及它们的变体。
** This mechanic is responsible for [[Special:MyLanguage/Blip|Blips]] and [[Special:MyLanguage/Jump Cancel|Jump-Cancel]], and their glitched variants.
</div>






<span id="Vertical_Collisions_(Y)"></span>
<div lang="en" dir="ltr" class="mw-content-ltr">
== 垂直碰撞(Y) ==
== Vertical Collisions (Y)==
</div>


在水平移动之前处理垂直移动。因此:
<div lang="en" dir="ltr" class="mw-content-ltr">
Vertical movement is processed before horizontal movement. Due to this:
</div>


* 玩家可以在跑出一个方块后的 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>




[[File:Y Collision zh.png|frameless|720x720px]]
<div lang="en" dir="ltr" class="mw-content-ltr">
[[File:Y Collision.png|frameless|720x720px]]
</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>


[[File:XZ collision zh.png|frameless|721x721px]]
<div lang="en" dir="ltr" class="mw-content-ltr">
[[File:XZ collision.png|frameless|720x720px]]
</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

Other languages:

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 之前的版本大不相同。