Leaning, known as Contextual Lean in Call of Duty: Ghosts, is a mechanic in all games since Call of Duty 4: Modern Warfare for the PC. However, for consoles, it only appears in Call of Duty, Call of Duty: Classic, Call of Duty: Ghosts and the campaign of Call of Duty: Infinite Warfare. Leaning allows the player to fire from behind cover (such as the corner of a wall) without completely exposing themselves to their enemies, making it an effective gameplay mechanic at the player's disposal.
Call of Duty/Call of Duty: Classic
In Call of Duty: Classic, this can be activated by pressing the left and right arrow buttons. Pressing the left arrow button will make the character lean to the left while the right arrow button will make the player lean to the right.
Call of Duty: Ghosts
In Call of Duty: Ghosts, this can be activated by going behind an object and pressing the aim button when a yellow arrow shows up next to the crosshair. Depending on what direction the arrow is pointing, the player will lean in that direction.
Call of Duty: Infinite Warfare
Leaning returns mostly unchanged from Call of Duty: Ghosts, it can be activated by going behind an object and pressing the aim button when a yellow arrow shows up next to the crosshair. Depending on what direction the arrow is pointing, the player will lean in that direction.
It is not available in the multiplayer or Zombies mode.
Call of Duty: WWII
Campaign
In campaign, leaning can be activated by going behind and the edge of an object, pressing the aim button. When the player can lean, the weapon that the player is holding will lean to the direction.
Multiplayer
In multiplayer, this can only be activated by editing the keys_mp config file during the PC Open Beta. However, the leaning option will appear in the keybindings for PC at launch.