Player Movement: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
(basic draft)
 
No edit summary
Line 1: Line 1:
Every [[Ticks|tick]], the game checks for the player's inputs, and translates them into motion.
[WiP]

This article doesn't deal with the exact math. For the full picture, see [[Movement Formulas]].

== Jumping ==
The player can jump up to 1.249m high. (1.252 in 1.9+). To start a jump, the player must have been on ground the previous tick: this allows the player to initiate a jump one tick after running off a block

In short, jumping sets the player's vertical speed to 0.42. Every tick, this speed is decreased by 0.08, then multiplied by 0.98.


<br />


== Walking ==
== Walking ==
Walking is the default movement state, adding 0.1 units of acceleration every tick (times 0.98 if not strafing).
100% speed

The maximum walking speed on ground is about 0.22 m/t.



== Sprinting ==
== Sprinting ==
Sprinting is 30% faster than walking, granting a total of 0.13 units of acceleration every tick (times 0.98 if not strafing).
130% speed

If the player jumps while sprinting, they gain 0.2 units of acceleration towards the direction they are facing (even if they are strafing). This is why sprintjumping is the most efficient technique to gain speed.

The maximum sprinting speed on ground is about 0.286 m/t.



== Sneaking ==
== Sneaking ==
Sneaking is the slowest movement speed, being 70% slower than walking and granting only 0.0294 units of acceleration per tick.
30% speed


If the player is strafing, the acceleration is added as is in both directions, making the player move '''√'''2 times faster, with about 0.0416 units of acceleration per tick.
45° strafing is ~41% faster than regular sneaking speed.


Sneaking lowers the player's bounding box in 1.9+.
<br />


More importantly, sneaking allows the player to move towards the edge of a block without falling, which is useful for positioning. Note that sneaking works with "1 tick of delay": if it's activated while walking off a ledge, the player will stop moving for a tick as if it worked, but will start falling on the next. This phenomenon is commonly called "shift glitch".
== Jumping ==

1.249m jump height (1.252 in 1.9+)

Another property of sneaking on a ledge is that it doesn't reset the player's speed even if they don't appear to be moving. This can be used to gain a little more speed for jumps with no momentum.


Sneaking lowers the player's bounding box in 1.9+:

* By default, the player is 1.8m tall
* When sneaking in versions 1.9 - 1.13, the player is 1.65m tall.
* When sneaking in versions 1.14+, the player is only 1.5m tall, making them able to fit under 1.5b ceilings.<br />

Revision as of 20:58, 23 December 2020

Every tick, the game checks for the player's inputs, and translates them into motion.

This article doesn't deal with the exact math. For the full picture, see Movement Formulas.

Jumping

The player can jump up to 1.249m high. (1.252 in 1.9+). To start a jump, the player must have been on ground the previous tick: this allows the player to initiate a jump one tick after running off a block

In short, jumping sets the player's vertical speed to 0.42. Every tick, this speed is decreased by 0.08, then multiplied by 0.98.


Walking

Walking is the default movement state, adding 0.1 units of acceleration every tick (times 0.98 if not strafing).

The maximum walking speed on ground is about 0.22 m/t.


Sprinting

Sprinting is 30% faster than walking, granting a total of 0.13 units of acceleration every tick (times 0.98 if not strafing).

If the player jumps while sprinting, they gain 0.2 units of acceleration towards the direction they are facing (even if they are strafing). This is why sprintjumping is the most efficient technique to gain speed.

The maximum sprinting speed on ground is about 0.286 m/t.


Sneaking

Sneaking is the slowest movement speed, being 70% slower than walking and granting only 0.0294 units of acceleration per tick.

If the player is strafing, the acceleration is added as is in both directions, making the player move 2 times faster, with about 0.0416 units of acceleration per tick.


More importantly, sneaking allows the player to move towards the edge of a block without falling, which is useful for positioning. Note that sneaking works with "1 tick of delay": if it's activated while walking off a ledge, the player will stop moving for a tick as if it worked, but will start falling on the next. This phenomenon is commonly called "shift glitch".


Another property of sneaking on a ledge is that it doesn't reset the player's speed even if they don't appear to be moving. This can be used to gain a little more speed for jumps with no momentum.


Sneaking lowers the player's bounding box in 1.9+:

  • By default, the player is 1.8m tall
  • When sneaking in versions 1.9 - 1.13, the player is 1.65m tall.
  • When sneaking in versions 1.14+, the player is only 1.5m tall, making them able to fit under 1.5b ceilings.