碰撞

From Minecraft Parkour Wiki
Revision as of 08:42, 14 November 2021 by Pjx1314 (talk | contribs) (Created page with "玩家往往倾向于面向 Z 的旋转跳更容易,但面向 X 的旋转跳实际上距离更短:")
Other languages:

Minecraft 的碰撞物理非常簡單:遊戲沒有光線追蹤碰撞,而是簡單地沿每個軸順序移動玩家。

在此提醒,Minecraft的物理更新速度為每秒 20 ticks。玩家的移動和碰撞每Tick更新一次。


碰撞箱

一個碰撞箱由一個或多個邊界箱組成,邊界箱是由最小和最大 X/Y/Z 坐標定義的簡單長方體。

碰撞通常涉及一個實體和一個方塊:方塊和方塊之間通常不會相互碰撞。

  • 玩家只有一個邊界箱,尺寸為 0.6×1.8×0.6 m3。它們的位置(如F3所示)位於底部中心


注意:判定箱'是玩家可以點擊的(例如攻擊實體、按下按鈕、打開門)。它不一定與碰撞框重疊。


碰撞順序

每次更新玩家速度後,遊戲會執行以下步驟來檢查碰撞情況:

  • 沿 Y 軸移動玩家。如果在向下移動時檢測到垂直碰撞,則玩家現在被認定在地面上。
  • 沿 X 軸移動玩家。
  • 沿 Z 軸移動玩家。
  • 如果玩家在地面上撞到一堵牆並且牆的高度小於0.6米,他們可以跨過牆。


垂直碰撞(Y)

在水平移動之前處理垂直移動。因此:

  • 玩家可以在跑過一個方塊後跳一個滴答。這就是延立的原理。
  • 為了降落在方塊上,玩家的邊界箱必須在跳躍的最後時刻與其表面重疊。


當玩家撞到地板或天花板時,他們的垂直速度會重置為 0。


水平碰撞(X/Z)

Due to the X axis being processed before the Z axis, corner collisions don't behave the same depending on the direction.

這種現象在高速時尤為明顯。

區分「X」跳和「Z」跳十分重要:

  • 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.
  • 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.

面向的軸向可以用F3查看。


玩家往往傾向於面向 Z 的旋轉跳更容易,但面向 X 的旋轉跳實際上距離更短:

  • 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 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.

Some jumps are only possible when facing one axis or the other (for example, a 2bm triple neo is only possible X-facing)


1.14+

1.14 更新了碰撞物理。碰撞顺序现在取决于玩家的速度:
  • 如果玩家的Z速度大於X速度(絕對值),碰撞順序為Y-X-Z
  • 否則,碰撞順序為Y-Z-X

In most cases, all collisions now resemble X-facing. Some jumps which involve cutting corners may be very different compared to pre-1.14.