Horizontal Movement Formulas/zh: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
(Created page with "::<math>E_{t} = (\underset{每级缓慢减少 \; 15\%}{\underset{每级速度增加 \; 20\%}{\underbrace{\left ( 1 + 0.2\times 速度 \right ) \: \times\: \left ( 1 - 0.15\times 缓慢 \right )}}} \geq 0</math>")
(Created page with "这些简化的公式只适用于线性运动(方向不变)。 尽管这个条件似乎很有限制性,但这些公式对分析常规的跳跃和助跑非常有用。 之后我们将扩展这些公式以将角度囊括其中。 :<br />'''定义''': :*<math>V_{H,0}</math> 是玩家的初始速度(正常 = 0)。 :*<math display="inline">V_{H,t}</math> 是玩家在第 <math display="inline">t</math> tick 的速度。")
Line 35: Line 35:
== 线性运动公式 ==
== 线性运动公式 ==


这些简化的公式只适用于线性运动(方向不变)。
<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>




:'''地面速度''':
<div lang="en" dir="ltr" class="mw-content-ltr">
:'''Ground Speed''':
</div>


::<math>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}}} </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>




:'''跳跃速度''':
<div lang="en" dir="ltr" class="mw-content-ltr">
:'''Jump Speed''':
</div>


::<math>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{Sprinting}\\ 0.0 & \textrm{Else}\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>




:'''空中速度''':
<div lang="en" dir="ltr" class="mw-content-ltr">
:'''Air Speed''':
</div>


::<math>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}}}} </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>





Revision as of 15:27, 3 February 2022

Other languages:

在每 tick,游戏会进行如下三个步骤:

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

我们将从介绍各种乘数开始,尽力使公式可读性更强。


乘数

移动乘数(参见 45°斜跑


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 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 (syntax error): {\displaystyle E_{t} = (\underset{每级缓慢减少 \; 15\%}{\underset{每级速度增加 \; 20\%}{\underbrace{\left ( 1 + 0.2\times 速度 \right ) \: \times\: \left ( 1 - 0.15\times 缓慢 \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)。
  • 是玩家在第 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_{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{Sprinting}\\ 0.0 & \textrm{Else}\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}}}} }


Complete Formulas

Let's introduce two more variables:

  • , The player's Direction in degrees (defined by their inputs and rotation)
  • , The player's Facing in degrees (defined by their rotation only)


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.


Definition:
  • and correspond to the player's initial velocity.
  • and correspond to the player's velocity on tick

Ground Velocity:
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}) }
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}) }
Jump Velocity:
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}) + \begin{Bmatrix} 0.2 & \textrm{Sprinting}\\ 0.0 & \textrm{Else}\end{Bmatrix} \times \sin (F_{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}) + \underset{Sprintjump \; Boost }{\underbrace{\begin{Bmatrix} 0.2 & \textrm{Sprinting}\\ 0.0 & \textrm{Else}\end{Bmatrix} \times \cos (F_{t})}} }
Air Velocity:
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}) }


Stopping Conditions

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 , momentum is cancelled and only the acceleration is left.
If , momentum is cancelled and only the acceleration is left.
In 1.9+, they are compared to 0.003 instead.


Source Code

[...]