Horizontal Movement Formulas/zh: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
No edit summary
(Updating to match new version of source page)
Line 17: Line 17:




<div class="mw-translate-fuzzy">
::<math>M_{t} = \begin{Bmatrix}1.3 & \textrm{疾 跑} \\ 1.0 & \textrm{行 走}\\ 0.3 & \textrm{潜 行}\\ 0.0 & \textrm{停 止} \end{Bmatrix} \times \begin{Bmatrix}0.98 & \textrm{正 常}\\ 1.0 & \textrm{45°斜 跑} \\ 0.98 \sqrt{2} & \textrm{45°潜 行} \end{Bmatrix}</math>
::<math>M_{t} = \begin{Bmatrix}1.3 & \textrm{疾 跑} \\ 1.0 & \textrm{行 走}\\ 0.3 & \textrm{潜 行}\\ 0.0 & \textrm{停 止} \end{Bmatrix} \times \begin{Bmatrix}0.98 & \textrm{正 常}\\ 1.0 & \textrm{45°斜 跑} \\ 0.98 \sqrt{2} & \textrm{45°潜 行} \end{Bmatrix}</math>
</div>




Line 23: Line 25:




<div class="mw-translate-fuzzy">
::<math>E_{t} = \underset{\textrm{每 级 缓 慢 减 少} \; 15\%}{\underset{\textrm{每 级 速 度 增 加} \; 20\%}{\underbrace{\left ( 1 + 0.2\times \textrm{速 度} \right ) \: \times\: \left ( 1 - 0.15\times \textrm{缓 慢} \right )}}} \geq 0</math>
::<math>E_{t} = \underset{\textrm{每 级 缓 慢 减 少} \; 15\%}{\underset{\textrm{每 级 速 度 增 加} \; 20\%}{\underbrace{\left ( 1 + 0.2\times \textrm{速 度} \right ) \: \times\: \left ( 1 - 0.15\times \textrm{缓 慢} \right )}}} \geq 0</math>
</div>




Line 47: Line 51:
:'''地面速度''':
:'''地面速度''':


<div class="mw-translate-fuzzy">
::<math>V_{H,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} </math>
::<math>V_{H,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} </math>
</div>




:'''跳跃速度''':
:'''跳跃速度''':


<div class="mw-translate-fuzzy">
::<math>V_{H,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} + \underset{\textrm{疾 跑 跳 跃 加 成}}{\underbrace{\begin{Bmatrix}0.2 & \textrm{疾 跑}\\ 0.0 & \textrm{其 它}\end{Bmatrix} }}</math>
::<math>V_{H,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} + \underset{\textrm{疾 跑 跳 跃 加 成}}{\underbrace{\begin{Bmatrix}0.2 & \textrm{疾 跑}\\ 0.0 & \textrm{其 它}\end{Bmatrix} }}</math>
</div>




:'''空中速度''':
:'''空中速度''':


<div class="mw-translate-fuzzy">
::<math>V_{H,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{\underset{ }{0.02 \times M_{t}}}} </math>
::<math>V_{H,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{\underset{ }{0.02 \times M_{t}}}} </math>
</div>




Line 79: Line 89:
:'''地面速度''':
:'''地面速度''':


<div class="mw-translate-fuzzy">
::<math>V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 } \: + \: 0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3} \times \sin (D_{t}) </math>
::<math>V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 } \: + \: 0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3} \times \sin (D_{t}) </math>
::<math>V\displaystyle _{Z,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} \times \cos (D_{t}) </math>
::<math>V\displaystyle _{Z,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} \times \cos (D_{t}) </math>
</div>


:'''跳跃速度''':
:'''跳跃速度''':


<div class="mw-translate-fuzzy">
::<math>V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 } \: + \: 0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3} \times \sin (D_{t}) + \begin{Bmatrix} 0.2 & \textrm{疾 跑}\\ 0.0 & \textrm{其 它}\end{Bmatrix} \times \sin (F_{t}) </math>
::<math>V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 } \: + \: 0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3} \times \sin (D_{t}) + \begin{Bmatrix} 0.2 & \textrm{疾 跑}\\ 0.0 & \textrm{其 它}\end{Bmatrix} \times \sin (F_{t}) </math>
::<math>V\displaystyle _{Z,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} \times \cos (D_{t}) + \underset{\textrm{疾 跑 跳 跃 加 成}}{\underbrace{\begin{Bmatrix} 0.2 & \textrm{疾 跑}\\ 0.0 & \textrm{其 它}\end{Bmatrix} \times \cos (F_{t})}} </math>
::<math>V\displaystyle _{Z,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} \times \cos (D_{t}) + \underset{\textrm{疾 跑 跳 跃 加 成}}{\underbrace{\begin{Bmatrix} 0.2 & \textrm{疾 跑}\\ 0.0 & \textrm{其 它}\end{Bmatrix} \times \cos (F_{t})}} </math>
</div>


:'''空中速度''':
:'''空中速度''':


<div class="mw-translate-fuzzy">
::<math>V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 } \: + \: 0.02 \times M_{t} \times \sin (D_{t}) </math>
::<math>V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 } \: + \: 0.02 \times M_{t} \times \sin (D_{t}) </math>
::<math>V\displaystyle _{Z,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{\underset{}{0.02 \times M_{t}}}} \times \cos (D_{t}) </math>
::<math>V\displaystyle _{Z,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{\underset{}{0.02 \times M_{t}}}} \times \cos (D_{t}) </math>
</div>





Revision as of 09:07, 26 December 2023

Other languages:

在每一刻,遊戲會進行如下三個步驟:

  1. 將加速度加到玩家的速度中。
  2. 移動玩家(新的位置 = 原位置 + 速度)。
  3. 降低玩家的速度以模擬阻力。

我們將從介紹各種乘數開始,盡力使公式可讀性更強。


乘數

移動乘數(參見 45°斜跑


Failed to parse (unknown function "\begin{Bmatrix}"): {\displaystyle M_{t} = \begin{Bmatrix}1.3 & \textrm{疾 跑} \\ 1.0 & \textrm{行 走}\\ 0.3 & \textrm{潜 行}\\ 0.0 & \textrm{停 止} \end{Bmatrix} \times \begin{Bmatrix}0.98 & \textrm{正 常}\\ 1.0 & \textrm{45°斜 跑} \\ 0.98 \sqrt{2} & \textrm{45°潜 行} \end{Bmatrix}}


效果乘數(參見狀態效果


Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle E_{t} = \underset{\textrm{每 级 缓 慢 减 少} \; 15\%}{\underset{\textrm{每 级 速 度 增 加} \; 20\%}{\underbrace{\left ( 1 + 0.2\times \textrm{速 度} \right ) \: \times\: \left ( 1 - 0.15\times \textrm{缓 慢} \right )}}} \geq 0}


滑度乘數(參見滑度


Failed to parse (unknown function "\begin{Bmatrix}"): {\displaystyle S_{t} = \begin{Bmatrix}0.6 & \textrm{正 常}\\ 0.8 & \textrm{史 莱 姆}\\ 0.98& \textrm{冰} \\ 1.0 & \textrm{空 中} \end{Bmatrix}}


直線運動公式

這些簡化的公式只適用於直線運動(方向不變)。 儘管這個條件似乎很有限制性,但這些公式對分析常規的跳躍和助跑非常有用。 之後我們將通過引入角度來擴展這些公式。


定義
  • 是玩家的初始速度(正常 = 0)。
  • 是玩家在第 刻的速度。


地面速度
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle V_{H,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} }


跳躍速度
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle V_{H,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} + \underset{\textrm{疾 跑 跳 跃 加 成}}{\underbrace{\begin{Bmatrix}0.2 & \textrm{疾 跑}\\ 0.0 & \textrm{其 它}\end{Bmatrix} }}}


空中速度
Failed to parse (syntax error): {\displaystyle V_{H,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{\underset{ }{0.02 \times M_{t}}}} }


完整公式

讓我們引入兩個新變量:

  • ,玩家的方向,以度為單位(由玩家按鍵與旋轉角度決定)
  • ,玩家的朝向,以度為單位(僅由玩家旋轉角度決定)


實際上,角度並不那樣簡單,因為有效角的數量是有限的(參見朝向與角度)。

為了簡單起見,我們將忽略這一事實。


定義
  • 對應玩家的初始速度。
  • 對應玩家在第刻的速度。

地面速度
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 } \: + \: 0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3} \times \sin (D_{t}) }
Failed to parse (syntax error): {\displaystyle V\displaystyle _{Z,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} \times \cos (D_{t}) }
跳躍速度
Failed to parse (syntax error): {\displaystyle V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 } \: + \: 0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3} \times \sin (D_{t}) + \begin{Bmatrix} 0.2 & \textrm{疾 跑}\\ 0.0 & \textrm{其 它}\end{Bmatrix} \times \sin (F_{t}) }
Failed to parse (syntax error): {\displaystyle V\displaystyle _{Z,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} \times \cos (D_{t}) + \underset{\textrm{疾 跑 跳 跃 加 成}}{\underbrace{\begin{Bmatrix} 0.2 & \textrm{疾 跑}\\ 0.0 & \textrm{其 它}\end{Bmatrix} \times \cos (F_{t})}} }
空中速度
Failed to parse (syntax error): {\displaystyle V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 } \: + \: 0.02 \times M_{t} \times \sin (D_{t}) }
Failed to parse (syntax error): {\displaystyle V\displaystyle _{Z,t} = \underset{\textrm{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{\textrm{加 速 度}}{\underbrace{\underset{}{0.02 \times M_{t}}}} \times \cos (D_{t}) }


運動停止條件

如果玩家撞到牆壁,或者速度小到被認為可以忽略不計,那麼水平速度就會被設置為 0。


牆壁碰撞
如果玩家撞到 X 軸朝向的牆壁,則助跑部分被取消, 僅保留加速度部分。
如果玩家撞到 Z 軸朝向的牆壁,則助跑部分被取消, 僅保留加速度部分。
在這兩種情況下,玩家都會停止疾跑。


可忽略速度閾值
如果 ,助跑部分被取消,僅保留加速度部分。
如果 ,助跑部分被取消,僅保留加速度部分。
在 1.9+,閾值被調整到 0.003。


原始碼

[...]