What is hitscan?

Hitscan is a term used in video games to describe the method used for determining whether a projectile or shot has hit a target. In hitscan games, such as first-person shooters, when a player fires a weapon, the game instantly calculates whether the shot hits a target by tracing a line from the shooter's weapon to the target. If the line intercepts with the hitbox of the target, the shot is considered a hit.

Hitscan is preferred in fast-paced games where accuracy and timing are crucial, as it provides an immediate response on whether a shot is successful or not. It is commonly used in games like Counter-Strike, Overwatch, and Call of Duty.

Hitscan contrasts with projectile-based games, where the shot fired by a player has its own physics and travel time before reaching the target. Hitscan requires less computational resources because the hit calculation is instantaneous, making it a popular choice for many developers.