Horizontal Movement Formulas/zh: Difference between revisions
Content added Content deleted
(Created page with "::如果玩家撞到 X 轴朝向的墙壁,则助跑部分被取消,<math display="inline">V\displaystyle _{X,t}</math> 仅保留加速度部分。 ::如果玩家撞到 Z 轴朝向的墙壁,则助跑部分被取消,<math display="inline">V\displaystyle _{Z,t}</math> 仅保留加速度部分。 ::在这两种情况下,玩家都会停止疾跑。") |
No edit summary |
||
(34 intermediate revisions by 2 users not shown) | |||
Line 1:
<languages/>
__NOTOC__
在每
#将加速度加到玩家的速度中。
Line 11:
<span id="Multipliers"></span>
== 乘数 ==
Line 16 ⟶ 17:
::<math>M_{t} = \begin{Bmatrix}1.3 & \
Line 22 ⟶ 23:
::<math>E_{t} =
Line 28 ⟶ 29:
::<math>S_{t} = \begin{Bmatrix}0.6 & \
:
<br />
<span id="Linear_Formulas"></span>
== 直线
这些简化的公式只适用于直线
尽管这个条件似乎很有限制性,但这些公式对分析常规的跳跃和助跑非常有用。
之后我们将通过引入角度来扩展这些公式。
:<br />'''定义''':
:*<math>V_{H,0}</math> 是玩家的初始速度(正常 = 0)。
:*<math display="inline">V_{H,t}</math> 是玩家在第 <math display="inline">t</math>
:'''地面速度''':
::<math>V_{H,t} = \underset{\text{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}}
:'''跳跃速度''':
::<math>V_{H,t} = \underset{\text{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}}
:'''空中速度''':
::<math>V_{H,t} = \underset{\text{助 跑}}{\underbrace{\underset{ }{V_{H,t-1} \times S_{t-1} \times 0.91 }}}
<span id="Complete_Formulas"></span>
== 完整公式 ==
Line 72 ⟶ 75:
:'''定义''':
:*<math display="inline">V_{X,0}</math>
:*<math display="inline">V_{X,t}</math>
:'''地面速度''':
::<math>V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 }
::<math>V\displaystyle _{Z,t} = \underset{\text{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}}
:'''跳跃速度''':
::<math>V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 }
::<math>V\displaystyle _{Z,t} = \underset{\text{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}}
:'''空中速度''':
::<math>V\displaystyle _{X,t} = \underset{ }{V\displaystyle _{X,t-1} \times S_{t-1} \times 0.91 }
::<math>V\displaystyle _{Z,t} = \underset{\text{助 跑}}{\underbrace{\underset{ }{V\displaystyle _{Z,t-1} \times S_{t-1} \times 0.91 }}}
<span id="Stopping_Conditions"></span>
== 运动停止条件 ==
如果玩家撞到墙壁,或者速度小到被认为可以忽略不计,那么水平速度就会被设置为 0。
Line 105 ⟶ 107:
:'''可忽略速度阈值''':
::
::
▲::If <math display="inline"> \left | V\displaystyle _{Z,t} \times S_{t} \times 0.91 \right | < 0.005 </math> , momentum is cancelled and only the acceleration is left.
::在 1.9+,阈值被调整到 0.003。
<span id="Source_Code"></span>
==
[...]
|
Latest revision as of 12:32, 9 January 2024
在每一刻,游戏会进行如下三个步骤:
- 将加速度加到玩家的速度中。
- 移动玩家(新的位置 = 原位置 + 速度)。
- 降低玩家的速度以模拟阻力。
我们将从介绍各种乘数开始,尽力使公式可读性更强。
乘数
- 移动乘数(参见 45°斜跑)
- 效果乘数(参见状态效果)
- 滑度乘数(参见滑度)
直线运动公式
这些简化的公式只适用于直线运动(方向不变)。 尽管这个条件似乎很有限制性,但这些公式对分析常规的跳跃和助跑非常有用。 之后我们将通过引入角度来扩展这些公式。
定义:- 是玩家的初始速度(正常 = 0)。
- 是玩家在第 刻的速度。
- 地面速度:
- 跳跃速度:
- 空中速度:
完整公式
让我们引入两个新变量:
- ,玩家的方向,以度为单位(由玩家按键与旋转角度决定)
- ,玩家的朝向,以度为单位(仅由玩家旋转角度决定)
实际上,角度并不那样简单,因为有效角的数量是有限的(参见朝向与角度)。
为了简单起见,我们将忽略这一事实。
- 定义:
- 与 对应玩家的初始速度。
- 与 对应玩家在第刻的速度。
- 地面速度:
- 跳跃速度:
- 空中速度:
运动停止条件
如果玩家撞到墙壁,或者速度小到被认为可以忽略不计,那么水平速度就会被设置为 0。
- 墙壁碰撞:
- 如果玩家撞到 X 轴朝向的墙壁,则助跑部分被取消, 仅保留加速度部分。
- 如果玩家撞到 Z 轴朝向的墙壁,则助跑部分被取消, 仅保留加速度部分。
- 在这两种情况下,玩家都会停止疾跑。
- 可忽略速度阈值:
- 如果 ,助跑部分被取消,仅保留加速度部分。
- 如果 ,助跑部分被取消,仅保留加速度部分。
- 在 1.9+,阈值被调整到 0.003。
源代码
[...]