Why does aim assist exist? Why does aim assist exist for mouse and keyboard?

The answer to the first question is easy. Aim assist was invented to make it possible to play first person shooters with the controller. Aiming with the controller is hard and nowhere near the precision that the mouse offers (there’s a reason why for over fifty years the mouse remains the number one pointing device).

The very first computer mouse. Okay, so they evolved a little, but the idea remained the same.

Aim assist tries to compensate for the controller’s deficiency, and even though it’s still not the mouse, aim assist techniques have advanced far enough throughout the years for even some PC players to prefer the controller over the KBM.

But why does aim assist exist for mouse and keyboard?

Before I answer that, we need to look at what aim assist means, exactly. In Witchfire, there are two components of aim assist:

Stickiness: the crosshair slows down when passing over an enemy.

Bullet magnetism: if you miss just a little, the bullet still hits the target.

Stickiness exists only for the controllers. Not only it’s not necessary for the mouse and keyboard, it would actually get in the way. Muscle memory – like how much hand/arm effort it takes to move the crosshair a certain distance with the mouse – is an extremely important part of aiming. Anything that messes with it – like “random” crosshair slowdowns – would rightly frustrate the player.

So the stickiness is a controller-only thing. I guess it’s easy to understand why bullet magnetism exists for the controllers, too. The same story: pointing with this clunky device is hard even with the stickiness, so let’s help out a bit more and don’t require the player to be pixel-perfect with their aim.

However, that’s not the whole story. I mentioned it already, but in some games, and in Witchfire too, bullet magnetism also affects the mouse and keyboard.

There are two reasons for this:

There is a difference between choosing a Windows menu option or painting in Photoshop and taking your sweet time, and trying to headshot a fast moving, highly animated AI enemy. Note that bullet magnetism is not that necessary in Player vs. Player (PVP) games: the player model is nowhere near as animated as most AI enemies in games*. Without bullet magnetism, enemies would have to be more static in their movement, and that’s not what we want.



* This is actually why crouch spam was invented by some sneaky player, and plagues FPSes since then.



More importantly – and I mean it, this is crucial – the lack of bullet magnetism often makes a game feel buggy. For example, you might aim and fire at the edge of an enemy head and boom, the shot does not register, it’s a miss. To you, it looks like you did everything right. To the code, it was a miss because the bullet passed one micrometer away from the head (so if you played the game in some insane 1Mx1M resolution and took a screenshot, you would actually be able to see that the crosshair was a pixel away from the enemy – not something you can notice in 1920×1080).



One could say: “But why magnetism? Just make the bullets large.” Yes, it’s a solution, but then what happens when you shoot an enemy trying to hide behind a wall? Wouldn’t it be annoying that the bullet hit the edge of that wall and stopped there, just because it was invisibly large?



Things are even worse than this. I often see a streamer complaining that “It was a hit! Why didn’t he die?!” but when they angrily re-play the recorded clip frame by frame, they usually realize that nah, it was actually a miss. But I am sure the shot felt right to them, they were deeply convinced it was on target.



Bullet magnetism helps a lot in that department. If it’s properly designed and balanced, it will never make you feel like headshots are skill-less and free, but it will also reduce the amount of frustration with shots that felt right but weren’t. Quite simply, misses will be clearer and more obvious.

And this is why bullet magnetism exists both for the controllers and the mouse and keyboard.

For what it’s worth, though, bullet magnetism is not really a bullet magnetism.

There are no curved bullets. That’d be a whole bag of issues, like – if there was any bullet travel time – literally being able to kill enemies behind cover.

Wanted: Weapons of Faith, one of a few games in which your bullets killing enemies behind cover actually makes sense.

Gamers often think that bullet magnetism means large hitboxes. The idea here is that an enemy head is one thing, but there’s another head, an invisible one, that’s slightly larger than the real thing and used to detect collision with the bullets. Which explains why if you miss the real head by just a little, the shot still registers.

Most likely, that’s not it. One example reason is that various weapons usually have different aim assist values (you don’t want a sniper rifle to have the same aim assist generosity as a submachine gun) that also change with distance. Dynamically scaling and morphing (because it could not be just a simple scaling) all the weirdly shaped (from physics point of view) hitboxes is an absolutely unnecessary strain on the processor.

There is a much easier way, and this is what we use:

As you can see, the “bullet magnetism” system is attached to the gun, not the enemy.

There are five circles here, and here’s what they do:

The two outer, dark pink circles are for the stickiness. As soon as the larger circle touches the enemy, the crosshair begins to slow down. It reaches the full slowdown when the smaller circle touches the enemy.

Currently this system traces just the most important bones on the enemy (like the spine) to avoid weird slowdowns when an enemy hand enters the picture for a split second. It’s likely we will redo it in the future so it simply traces the enemy’s capsule (a “hitbox” used for movement and collision with other enemies and the player).

Inside there are two other circles: the larger is dark blue, the smaller is light blue. As soon as the larger circle touches the enemy, the spot that your bullet will hit will move closer to the edge of that circle. You would still miss the shot, though. It’s just that the bullet would hit closer to the enemy.

When the light blue circle touches the enemy, this time the bullet will hit them. In other words, as long as any part of the enemy is inside the light blue circle, it’s a hit.

Finally, there’s the smallest, white circle. This is used to prioritize critical hits (like headshots) over the regular body hits. If you aim at a body part but a critical area (like the head) is inside the white circle at the same time, the bullet will be pushed towards that area rather than hit the body. This helps avoid moments where e.g. you try to score a headshot but the enemy randomly waved their hand and the bullet hits the tip of the finger. Technically correct would not be the best kind of correct in this case.

The red cross inside all these circles is our debug thing that shows precisely where the bullet will land.

This is how it all works under the hood (choose Full Screen to better see the behavior of the red cross). Notice how the red cross changes position dynamically depending on what circle contains what body part. First it sticks to the head even though in theory our crosshair is not precisely on it yet, then later is sticks to the body even though our crosshair has left it.

The clip also highlights another benefit of aim assist: the ability to avoid the clothing issues. Like, a cape should not be something that when hit, depletes the enemy’s health, right? It’s just a cape. But if you shoot the cape, which feels like a part of the enemy, and there’s no damage, that feels weird. You feel cheated for not getting the damage in. With aim assist, to the player it still looks like the hit registers, even though we don’t treat the cape as something that’s connected to the enemy’s health.

Is it all that “simple”?

Well, yes, but actually no.

We’re seeing circles, but that’s just because we’re looking at it all from the player’s perspective. If you would be looking at it all from a side, you’d see multiple cones. Except they’re not perfect cones, because aim assist grows with strength until it reaches a weapon’s maximum effective range, then quickly deteriorates to make the out-of-range shots harder and less effective.

There’s more to the aim assist in Witchfire than what I described above, but I hope the post gives a pretty good idea of the way things work in the game. I think with this system – each weapon will have its own set of “circles” – we’re able to have the aiming system that feels fair, but without the weapon doing all the work for you.

Question of the Week

Will there be some "magics" weapons or spells? — Emmanuel EXE (@EmmanuelExe) February 23, 2019

Yes!