Difference between revisions of "Slow Fly"
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | {{P2 Title|Slow Fly}} | |
− | + | ==Overview== | |
+ | '''Slow fly''' (also known as strafe deadzone) is a movement related game mechanics, where if your vertical velocity is in specific range, your acceleration becomes 4 times smaller, resulting in movement being much harder to control. | ||
==Technical Explanation== | ==Technical Explanation== | ||
− | Slow fly is caused by your vertical speed being bigger than 0 ups but smaller than or equal 140 ups<ref>This means the player has to go up. When falling, vertical speed would be negative.</ref>. When this condition is met, <code>m_surfaceFriction</code> is changed from 1.0 to 0.25, effectively causing your air acceleration to be 4 times smaller. This | + | Slow fly is caused by your vertical speed being bigger than 0 ups but smaller than or equal 140 ups<ref>This means the player has to go up. When falling, vertical speed would be negative.</ref>. When this condition is met, <code>m_surfaceFriction</code> is changed from 1.0 to 0.25, effectively causing your air acceleration to be 4 times smaller. This was presumably implemented to prevent the player to scale the steep slopes. |
+ | |||
+ | For more technical insight, feel free to look at CS:GO source code leak, which contains some of the relevant Portal 2 source code.<ref><code>portal_gamemovement.cpp</code>, lines [https://github.com/perilouswithadollarsign/cstrike15_src/blob/29e4c1fda9698d5cebcdaf1a0de4b829fa149bf8/game/shared/portal/portal_gamemovement.cpp#L665 665] and [https://github.com/perilouswithadollarsign/cstrike15_src/blob/29e4c1fda9698d5cebcdaf1a0de4b829fa149bf8/game/shared/portal/portal_gamemovement.cpp#L1339 1339]</ref> | ||
==In-game effects== | ==In-game effects== |
Latest revision as of 11:17, 10 March 2023
Overview
Slow fly (also known as strafe deadzone) is a movement related game mechanics, where if your vertical velocity is in specific range, your acceleration becomes 4 times smaller, resulting in movement being much harder to control.
Technical Explanation
Slow fly is caused by your vertical speed being bigger than 0 ups but smaller than or equal 140 ups[1]. When this condition is met, m_surfaceFriction
is changed from 1.0 to 0.25, effectively causing your air acceleration to be 4 times smaller. This was presumably implemented to prevent the player to scale the steep slopes.
For more technical insight, feel free to look at CS:GO source code leak, which contains some of the relevant Portal 2 source code.[2]
In-game effects
Slow fly can be noticed in two scenarios: when jumping and during Crouch Fly Glitch. In former case, it's barely noticeable, since you're within required vertical speed range for only 14 ticks (about 1/4th of a second or 1/3th of a jump on a flat surface). However, during crouch fly, vertical speed is constant until you interact with something that changes it (ramp-like object or ground), which means, once it gets into the range, the effect of slow fly is easy to notice.
The most common way of entering the slow fly state is by hitting the vertical doors model, which apparently is an extremely steep slope rather than a wall. The amount of vertical speed gained by a quick collision with it is bigger than zero (which puts you in a slow-fly state) but at the same time is so small that it doesn't change your position (thanks to the way floating point numbers work).
This exploit is used in Finale 4's Least Portals route, where you gain a small amount of vertical speed in order to get into the next section of the level without placing any portals.