
Second, most implementations of hitscan use straight rays. Notice how the muzzle flare and the hit effects on the ground show up at the same time. This means it’s impossible to dodge a bullet if a ray is on target, even if the target is miles away.Ībove: Halo.

There is no travel time after you fire a bullet and hit an object. Characters such as Soldier 76, McCree and Widowmaker from Overwatch have hitscan weapons, and most Call of Duty guns are hitscan as well.īelow: Examples from Overwatch, Call of Duty, Wolfenstein 3Dįirst, you may have noticed that rays have an infinite traveling velocity, thus reaching their destination instantly. Wolfenstein 3D and Doom are classic examples, but even recent games use this technology. Thus, it’s no surprise that many games in the industry use hitscan for its shooting logic. Recoil is simple to add, as the addition of a small perturbation in the aim of the gun will mimic the effect. That means the network engineering needed to keep many clients in sync is minimal since the server only needs to keep track of the direction of the ray.

It’s quick to compute and does not need overhead memory or processing time to build a new physics object. The main advantage of using raycasting is that it’s super fast. Genji’s deflect is an example of a reflective surface.

If the engine determines that an object is in the line of fire, it will notify it with a message that it was “hit” with a bullet.
