水平方向の動きの公式

From Minecraft Parkour Wiki
Revision as of 14:09, 26 June 2022 by KK kaku (talk | contribs) (Created page with ":'''定義''': :*<math display="inline">V_{X,0}</math>と<math display="inline">V_{Z,0}</math>はプレイヤーの初速に対応する。 :*<math display="inline">V_{X,t}</math>と<math display="inline">V_{Z,t}</math>は<math display="inline">t</math> tick目でのプレイヤーの速度に対応する。 <br /> <br /> :'''地面での速度''':")
Other languages:

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

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

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


倍率

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


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° Strafe} \\ 0.98 \sqrt{2} & \textrm{45°ス ニ ー ク} \end{Bmatrix}}


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


Failed to parse (syntax error): {\displaystyle E_{t} = (\underset{\textrm{移 動 速 度 低 下 の レ ベ ル 1 ご と に} \; 15\% \textrm{低 下}}{\underset{\textrm{移 動 速 度 上 昇 の レ ベ ル 1 ご と に} \; 20\% \textrm{増 加}}{\underbrace{\left ( 1 + 0.2\times \textrm{移 動 速 度 上 昇 } \right ) \: \times\: \left ( 1 - 0.15\times \textrm{移 動 速 度 低 下 } \right )}}} \geq 0}


Slipperinessの倍率Slipperinessを参照)


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 S_{t} = \begin{Bmatrix}0.6 & \textrm{通 常}\\ 0.8 & \textrm{ス ラ イ ム}\\ 0.98& \textrm{氷} \\ 1.0 & \textrm{空 中} \end{Bmatrix}}


直線の公式

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


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


地面での速度:
Failed to parse (syntax error): {\displaystyle V_{H,t} = \underset{慣 性}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{加 速 度}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} }


ジャンプの速度:
Failed to parse (syntax error): {\displaystyle V_{H,t} = \underset{慣 性}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}} \: + \: \underset{加 速 度}{\underbrace{0.1 \times M_{t} \times E_{t} \times \left (\frac{0.6}{S_{t}} \right )^{3}}} + \underset{ダ ッ シ ュ ジ ャ ン プ ブ ー ス ト}{\underbrace{\begin{Bmatrix}0.2 & \textrm{ダ ッ シ ュ}\\ 0.0 & \textrm{そ れ 以 外}\end{Bmatrix} }}}


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


完全な公式

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

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


In reality, angles aren't as simple as that, as there are a limited number of significant angles (see Facing and Angles).

For the purpose of simplicity, we'll ignore this fact.


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

地面での速度:
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{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}) }
ジャンプの速度:
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{Sprinting}\\ 0.0 & \textrm{Else}\end{Bmatrix} \times \sin (F_{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 _{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})}} }
空中での速度:
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{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}) }


停止条件

Horizontal speed is set to 0 if the player hits a wall, or if the speed is considered to be negligible.


Wall Collision:
If the player hits a X-facing wall, then momentum is cancelled, and only includes acceleration.
If the player hits a Z-facing wall, then momentum is cancelled, and only includes acceleration.
In either of these case, the player stops sprinting.


Negligible Speed Threshold:
If then momentum is cancelled, and only the acceleration is left.
If then momentum is cancelled, and only the acceleration is left.
In 1.9+, they are compared to 0.003 instead.


ソースコード

[...]