Horizontal Movement Formulas/ja: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
(Created page with "::<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° Strafe} \\ 0.98 \sqrt{2} & \textrm{45°スニーク} \end{Bmatrix}</math>")
No edit summary
 
(66 intermediate revisions by 2 users not shown)
Line 11: Line 11:




<span id="Multipliers"></span>
==倍率==
==倍率==


Line 16: Line 17:




::<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° Strafe} \\ 0.98 \sqrt{2} & \textrm{45°スニーク} \end{Bmatrix}</math>
::<math>M_{t} = \begin{Bmatrix}1.3 & \text{ダ } \\ 1.0 & \text{歩 き}\\ 0.3 & \text{ス }\\ 0.0 & \text{停 止} \end{Bmatrix} \times \begin{Bmatrix}0.98 & \text{通 常}\\ 1.0 & 45^{\circ}~\text{Strafe} \\ 0.98 \sqrt{2} & 45^{\circ}~\text{ス } \end{Bmatrix}</math>




:'''エフェクトの倍率'''([[Special:MyLanguage/Status Effects|ステータス効果]]を参照)
<div lang="en" dir="ltr" class="mw-content-ltr">
:'''Effects Multiplier''' (See [[Special:MyLanguage/Status Effects|Status Effects]])
</div>




::<math>E_{t} = \underset{\text{移 動 速 度 低 下 の レ ベ ル 1 ご と に} ~ 15\% \text{低 下}}{\underset{\text{移 動 速 度 上 昇 の レ ベ ル 1 ご と に} ~ 20\% \text{増 加}}{\underbrace{\left ( 1 + 0.2\times \text{移 動 速 度 上 昇 } \right ) ~ \times ~ \left ( 1 - 0.15\times \text{移 動 速 度 低 下 } \right )}}} \geq 0</math>
<div lang="en" dir="ltr" class="mw-content-ltr">
::<math>E_{t} = (\underset{Decreases \; by \; 15\% \; per \; level \; of \; Slowness}{\underset{Increases \; by \; 20\% \; per \; level \; of \; Speed}{\underbrace{\left ( 1 + 0.2\times Speed \right ) \: \times\: \left ( 1 - 0.15\times Slowness \right )}}} \geq 0</math>
</div>




:'''滑りやすさの倍率'''([[Special:MyLanguage/Slipperiness/ja|滑りやすさ]]を参照)
<div lang="en" dir="ltr" class="mw-content-ltr">
:'''Slipperiness Multiplier''' (See [[Special:MyLanguage/Slipperiness|Slipperiness]])
</div>




::<math>S_{t} = \begin{Bmatrix}0.6 & \text{通 常}\\ 0.8 & \text{ス ラ イ ム }\\ 0.98& \text{氷} \\ 1.0 & \text{空 中} \end{Bmatrix}</math>
<div lang="en" dir="ltr" class="mw-content-ltr">
::<math>S_{t} = \begin{Bmatrix}0.6 & \textrm{Default}\\ 0.8 & \textrm{Slime}\\ 0.98& \textrm{Ice} \\ 1.0 & \textrm{Airborne} \end{Bmatrix}</math>
:
:
</div>


<br />
<br />


<span id="Linear_Formulas"></span>
==直線の公式==
==直線の公式==


以下の簡易式は、直線的な動き(移動方向の変化なし)にのみ適用される。
<div lang="en" dir="ltr" class="mw-content-ltr">
この条件は限定的に思えるかもしれないが、シンプルなジャンプや助走の分析に非常に有用である。
These simplified formulas only apply to linear movement (no change in direction).
角度を含めた公式への拡張は、後の見出しで行う。
While this condition might seem very restrictive, these formulas are very useful to analyze conventional jumps and momentum
:<br />'''定義''':
We'll later expand on these formulas by including angles.
:*<math>V_{H,0}</math>はプレイヤーの初速(デフォルト = 0)。
:<br />'''Definition''':
:*<math display="inline">V_{H,t}</math>は <math display="inline">t</math> tick目でのプレイヤーの速度。
:*<math>V_{H,0}</math> is the player's initial speed (default = 0).
:*<math display="inline">V_{H,t}</math> is the player's speed on tick <math display="inline">t</math>.
</div>




:'''地面での速''':
:'''地面での速''':


::<math>V_{H,t} = \underset{\text{慣 性}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} ~ + ~ \underset{\text{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}}</math>
<div lang="en" dir="ltr" class="mw-content-ltr">
::<math>V_{H,t} = \underset{Momentum}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{Acceleration}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} </math>
</div>




:'''ジャンプの速''':
:'''ジャンプの速''':


::<math>V_{H,t} = \underset{\text{慣 性}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} ~ + ~ \underset{\text{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} + \underset{\text{ダ ッ シ ュ ジ ャ ン プ ブ ー ス ト}}{\underbrace{\begin{Bmatrix}0.2 & \text{ダ ッ シ ュ }\\ 0.0 & \text{そ れ 以 外}\end{Bmatrix} }}</math>
<div lang="en" dir="ltr" class="mw-content-ltr">
::<math>V_{H,t} = \underset{Momentum}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{Acceleration}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} + \underset{Sprintjump \; Boost}{\underbrace{\begin{Bmatrix}0.2 & \textrm{Sprinting}\\ 0.0 & \textrm{Else}\end{Bmatrix} }}</math>
</div>




:'''空中での速''':
:'''空中での速''':


::<math>V_{H,t} = \underset{\text{慣 性}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} ~ + ~ \underset{\text{加 速 度}}{\underbrace{\underset{ }{0.02 \times M_{t}}}} </math>
<div lang="en" dir="ltr" class="mw-content-ltr">
::<math>V_{H,t} = \underset{Momentum}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{Acceleration}{\underbrace{\underset{ }{0.02 \times M_{t}}}} </math>
</div>






<span id="Complete_Formulas"></span>
==完全な公式==
==完全な公式==


新しい変数を2つ導入する:
<div lang="en" dir="ltr" class="mw-content-ltr">
:*<math display="inline"> D_{t} </math>(Direction)、プレイヤーの動いている角度、単位は度(キー入力と回転角度によって決まる)。
Let's introduce two more variables:
:*<math display="inline"> D_{t} </math> , The player's Direction in degrees (defined by their inputs and rotation)
:*<math display="inline"> F_{t} </math>(Facing)、プレイヤーの向いている角度、単位は度(回転角度のみによって決まる)。
:*<math display="inline"> F_{t} </math> , The player's Facing in degrees (defined by their rotation only)
</div>




実際には、significant angleの数が限られているため、角度はそれほど単純ではない([[Special:MyLanguage/Angles|角度]]を参照)。
<div lang="en" dir="ltr" class="mw-content-ltr">
In reality, angles aren't as simple as that, as there are a limited number of significant angles (see [[Special:MyLanguage/Facing and Angles|Facing and Angles]]).
</div>


簡略化のため、この事実は無視する。
<div lang="en" dir="ltr" class="mw-content-ltr">
For the purpose of simplicity, we'll ignore this fact.
</div>




:'''定義''':
<div lang="en" dir="ltr" class="mw-content-ltr">
:*<math display="inline">V_{X,0}</math>と<math display="inline">V_{Z,0}</math>はプレイヤーの初速に対応する。
:'''Definition''':
:*<math display="inline">V_{X,0}</math> and <math display="inline">V_{Z,0}</math> correspond to the player's initial velocity.
:*<math display="inline">V_{X,t}</math><math display="inline">V_{Z,t}</math>は<math display="inline">t</math> tick目でのプレイヤーの速度に対応する。 <br /> <br />
:'''地面での速度''':
:*<math display="inline">V_{X,t}</math> and <math display="inline">V_{Z,t}</math> correspond to the player's velocity on tick <math display="inline">t</math> <br /> <br />
:'''Ground Velocity''':
</div>


::<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>
<div lang="en" dir="ltr" class="mw-content-ltr">
::<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{\text{慣 性}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} ~ + ~ \underset{\text{加 速 度}}{\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{Momentum}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{Acceleration}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} \times \cos (D_{t}) </math>
</div>


:'''ジャンプの速度''':
:'''ジャンプの速度''':


::<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 & \text{ダ ッ シ ュ }\\ 0.0 & \text{そ れ 以 外 }\end{Bmatrix} \times \sin (F_{t}) </math>
<div lang="en" dir="ltr" class="mw-content-ltr">
::<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{Sprinting}\\ 0.0 & \textrm{Else}\end{Bmatrix} \times \sin (F_{t}) </math>
::<math>V\displaystyle _{Z,t} = \underset{\text{慣 性}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} ~ + ~ \underset{\text{加 速 度}}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} \times \cos (D_{t}) + \underset{\text{ダ ッ シ ュ ジ ャ ン プ ブ ー ス ト}}{\underbrace{\begin{Bmatrix} 0.2 & \text{ダ ッ シ ュ }\\ 0.0 & \text{そ れ 以 外 }\end{Bmatrix} \times \cos (F_{t})}} </math>
::<math>V\displaystyle _{Z,t} = \underset{Momentum}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{Acceleration}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} \times \cos (D_{t}) + \underset{Sprintjump \; Boost }{\underbrace{\begin{Bmatrix} 0.2 & \textrm{Sprinting}\\ 0.0 & \textrm{Else}\end{Bmatrix} \times \cos (F_{t})}} </math>
</div>


:'''空中での速度''':
:'''空中での速度''':


::<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>
<div lang="en" dir="ltr" class="mw-content-ltr">
::<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{\text{慣 性}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} ~ + ~ \underset{\text{加 速 度}}{\underbrace{\underset{}{0.02 \times M_{t}}}} \times \cos (D_{t}) </math>
::<math>V\displaystyle _{Z,t} = \underset{Momentum}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{Acceleration}{\underbrace{\underset{}{0.02 \times M_{t}}}} \times \cos (D_{t}) </math>
</div>




<span id="Stopping_Conditions"></span>
==停止条件==
==停止条件==


水平方向の速度は、プレイヤーが壁に接触するか、その速度が無視できるほど小さいと判断された場合、0に設定される。
<div lang="en" dir="ltr" class="mw-content-ltr">
Horizontal speed is set to 0 if the player hits a wall, or if the speed is considered to be negligible.
</div>




:'''壁の衝突判定''':
<div lang="en" dir="ltr" class="mw-content-ltr">
:'''Wall Collision''':
</div>


::プレイヤーがX方向の壁と接触すると、慣性がキャンセルされ、<math display="inline">V\displaystyle _{X,t}</math>に含まれるのは加速度のみになる。
<div lang="en" dir="ltr" class="mw-content-ltr">
::If the player hits a X-facing wall, then momentum is cancelled, and <math display="inline">V\displaystyle _{X,t}</math> only includes acceleration.
::プレイヤーがZ方向の壁と接触すると、慣性がキャンセルされ、<math display="inline">V\displaystyle _{Z,t}</math>に含まれるのは加速度のみになる。
::どちらの場合も、ダッシュは途切れる。
::If the player hits a Z-facing wall, then momentum is cancelled, and <math display="inline">V\displaystyle _{Z,t}</math> only includes acceleration.
::In either of these case, the player stops sprinting.
</div>






:'''無視できる速度のしきい値''':
<div lang="en" dir="ltr" class="mw-content-ltr">
:'''Negligible Speed Threshold''':
</div>


::<math display="inline"> \left | V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 \right | < 0.005</math> の場合、慣性がキャンセルされ、加速度のみが残る。
<div lang="en" dir="ltr" class="mw-content-ltr">
::If <math display="inline"> \left | V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 \right | < 0.005, </math> then momentum is cancelled, and only the acceleration is left.
::<math display="inline"> \left | V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 \right | < 0.005</math> の場合、慣性がキャンセルされ、加速度のみが残る。
::If <math display="inline"> \left | V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 \right | < 0.005, </math> then momentum is cancelled, and only the acceleration is left.
</div>


::1.9以降は、このしきい値は0.003となる。
<div lang="en" dir="ltr" class="mw-content-ltr">
::In 1.9+, they are compared to 0.003 instead.
</div>






<span id="Source_Code"></span>
==ソースコード==
==ソースコード==



Latest revision as of 09:49, 26 December 2023

Other languages:

ゲーム内では、以下の3ステップが毎tick実行される:

  1. プレイヤーの速度に加速度を加える。
  2. プレイヤーを動かす(新しい位置 = 元の位置 + 速度)。
  3. 抗力の再現のため、プレイヤーの速度を落とす。

公式をより読みやすくするため、各種倍率の紹介から始める。


倍率

移動方法の倍率45°Strafeを参照)



エフェクトの倍率ステータス効果を参照)



滑りやすさの倍率滑りやすさを参照)



直線の公式

以下の簡易式は、直線的な動き(移動方向の変化なし)にのみ適用される。 この条件は限定的に思えるかもしれないが、シンプルなジャンプや助走の分析に非常に有用である。 角度を含めた公式への拡張は、後の見出しで行う。


定義:
  • はプレイヤーの初速(デフォルト = 0)。
  • tick目でのプレイヤーの速度。


地面での速度:


ジャンプの速度:


空中での速度:


完全な公式

新しい変数を2つ導入する:

  • (Direction)、プレイヤーの動いている角度、単位は度(キー入力と回転角度によって決まる)。
  • (Facing)、プレイヤーの向いている角度、単位は度(回転角度のみによって決まる)。


実際には、significant angleの数が限られているため、角度はそれほど単純ではない(角度を参照)。

簡略化のため、この事実は無視する。


定義:
  • はプレイヤーの初速に対応する。
  • tick目でのプレイヤーの速度に対応する。

地面での速度:
ジャンプの速度:
空中での速度:


停止条件

水平方向の速度は、プレイヤーが壁に接触するか、その速度が無視できるほど小さいと判断された場合、0に設定される。


壁の衝突判定:
プレイヤーがX方向の壁と接触すると、慣性がキャンセルされ、に含まれるのは加速度のみになる。
プレイヤーがZ方向の壁と接触すると、慣性がキャンセルされ、に含まれるのは加速度のみになる。
どちらの場合も、ダッシュは途切れる。


無視できる速度のしきい値:
の場合、慣性がキャンセルされ、加速度のみが残る。
の場合、慣性がキャンセルされ、加速度のみが残る。
1.9以降は、このしきい値は0.003となる。


ソースコード

[...]