From Halopedia, the Halo wiki
Sword flying is a glitch present in Halo 2 and Halo 2: Anniversary. It allows players to extend the range of the energy sword's lunge by using the reticle of their secondary weapon. The term is sometimes also used more broadly to refer to any movement using the energy sword's lunge.
In order to perform one needs to have an energy sword and any other weapon equipped, preferably not a shotgun as well as an AI in campaign or an enemy player in multiplayer. Position yourself and aim the reticle at the enemy such that it is red. Rapidly switch weapons, press the action/reload button, and shoot buttons quickly in that order. If done correctly you should lunge towards the enemy from your current position as you would with a normal sword lunge. The window for the inputs is small however as they have to be frame perfect.
On the original Xbox version of the game the corresponding inputs are 'X', 'Y', and 'RT' respectively. The easiest way to perform the trick on this control scheme is to slide one's thumb from 'Y' to 'X' and then press 'RT'. The "default" for the Xbox One version of Halo 2: Anniversary is identical and as such the inputs translate the same way. However the actual default on Halo 2: Anniversary is the "Universal Default (Recon)" scheme which swaps action/reload to 'RB' instead, matching the newer games. In this case the thumb sliding method cannot be applied though manually pressing each button may be easier. Several other alternate control schemes such as "Universal Bump And Jump" will still accommodate the thumb slide albeit slightly differently. It is also sometimes suggested to simply try mashing all of the buttons until it works if one cannot perform it otherwise. When performing the glitch in multiplayer to explore it is suggested that one attempt the glitch with no ammo in their non sword weapon to avoid accidentally firing at their target.
When a player switches weapons the range of the weapon being switched out is still applied to that of the weapon being drawn for two frames. Thus if the reticle was red prior to switching weapons, then for one frame the now current weapon will remain red regardless of whether this would otherwise be true. In the case of the energy sword this means that two frames the game think that it is in range to lunge regardless of whether it actually is. Normally however one cannot immediately fire their weapon or correspondingly active the sword's lunge. Similar to melee cancelling however the action/reload button can cancel the remaining animation of the weapon being drawn allowing the player to lunge immediately if the reticle is still red.
Properties And Augmentations
In the early days of Halo 2 the glitch was commonly known as "Rocket Cancelling" or "The Rocket/Sword Glitch due to seemingly being discovered using the rocket launcher, likely due to being one of the easiest weapons to perform the glitch especially from a distance. The glitch can however be performed with any weapon's reticle as long as the reticle is red. As illustrated by the rocket launcher a large reticle is easier to perform the glitch due to requiring less precision. The needler as well as the fuel rod gun in campaign specifically are also easier to perform the glitch with. Scoped weapons will also increase the range at which the glitch can be performed. Thus the sniper rifle and beam rifle allow for the farthest range at which one can sword fly though they are also the most difficult due to having the smallest reticles.
Sword flying at it's core is still a sword lunge, which itself is considered by the game as a melee attack. As such one can sword cancel the swing to avoid hitting the AI or player one is lunging towards by either pressing action/reload or changing weapons. At larger ranges one can also perform various actions including throwing grenades and even firing their secondary weapon before even reaching the target. Likewise one can jump during the lunge. This will generally allow the player to pass over their target as well as change the angle at which they fly to a more vertical one. Though difficult one can even perform this extra jump during the input for the glitch itself. The input for this would be 'Y', 'X', 'A', 'RT' on the original Xbox and "default" control scheme on Halo 2: Anniversary. While one can both cancel and jump during the sword fly it is generally not necessary as jumping will usually take the player over the target anyway.
If one hits an angled surface or object including AIs and vehicles then the lunge can be redirected. The momentum carried in this case functions similarly to the laws surrounding conservation of momentum in real world physics; in other words a certain amount of forward momentum will be lost but some amount of horizontal momentum will be gained, thus changing the angle traveled. If the target the player is lunging towards moves horizontally then the player will likely stop upon reaching where the target was; this is especially noticeable in mid air. While slight movements may not affect the fly faster movements by the target generally do. These mid air stops ARE present with normal sword lunges as well but tend to have more of an impact when sword flying. While performing one lunge the player cannot perform a second one until they pass their target. As such one can only perform one sword fly at a time though once the target is reached another one can be performed immediately.
As a movement technique sword flying is useful for both the speed it grants as well as the areas it allows one to reach. Especially when combined with jumps and using the mid air jumps it allows players to gain height and bypass certain obstacles such as walls and gaps as well as reach areas they normally couldn't. Sword cancelling also allows players to slide past enemies while using them to cut the time and distance needed to travel. Redirecting also allows players to reach areas farther out than the enemy they were aiming for. Due to all of this the technique is heavily utilized by speed runners. As a combat technique sword flying allows one to reach an enemy from far away and strike them with the sword's full strength. It can also be used as a strong finisher in conjunction with other weapons. On this note it is worth noting that while the shotgun lacks any usefulness with this technique for movement, sword flying immediately after a shotgun shot can be used to deal larger amount of damage at close range. In campaign this can be used during the fight against Tartarus though it is fairly risky to do if one does not do it when he swings his hand angrily.
Feasibility And Version Differences
The glitch was present in the original Xbox release of Halo 2 in both campaign and multiplayer. Auto-Update 3 however mostly removed the glitch. Despite this one can still perform the glitch post patch; instead of pressing Y, one can press Y, X, and B at the same time; often the easiest way to do it is to spam Y, B, X, and RT until it works. It is much more difficult and will only lunge at other with certain angles. Installing multiplayer map pack also installs the first three auto-updates. Clearing the console's cache will remove the auto-updates and thus restore the glitch in full.
Halo 2 for Windows Vista does not have the glitch in it's original form. It does however have the post auto-update method and is likewise difficult has also been noted to be inconsistent, often giving smaller flies while occasionally giving longer flies.
Initially Halo 2: Anniversary on the Xbox One release of Halo: The Master Chief Collection lacked sword flying as well as many of the older physics of lunges. However, the glitch was intentionally patched back into the game (with the original pre-patch method, along with the melee physics) during the massive update in August 2018, with confirmation of its return in insider builds as early as July of the same year. Unlike both the original Xbox and Vista releases of Halo 2, it is only possible in campaign, likely to allow speed runners and others to enjoy the trick but avoiding issues with multiplayer. The trick is present in the same manner for the PC release of The Master Chief Collection.
As Halo 2: Anniversary has twice frame and tick rate of the original Xbox version, the trick is slightly more difficult due to the window to perform it being twice as small. However it is also noted to be faster and allowing for farther flies past enemies.
In the original Xbox version of the game another glitch allowed players to store lunges by either inputting them from a passenger seat of Warthog or Spectre or simply getting into any vehicle seat immediately after the lunge input. Upon exiting the vehicle the player would often fly far and even at unique angles. Sometimes also referred to as sword flying, the two methods could be used in conjunction with each other. This trick was however removed in the same auto-update that mostly removed the glitch in this article.