I'm pretty proud of a headshot mechanic I've added recently. The game already featured randomised critical hits which could cause enemies heads to chip or explode violently, but now the headshots can be accomplished by player skill as well as if you just get lucky.
When you are aiming at a enemy a crosshair appears around their head. It gets smaller and smaller until is focused tightly on the enemies head and turns red. At this point if the player can headshot the enemy. If the player's aim comes off the enemy then the selection bracket will unfocus and disappear rather quickly, so it is pretty challenging to headshot enemies that are moving and firing back.
The speed with which the crosshair focusses is dependant on the weapon and the distance from the player to the target. You cannot headshot someone with a pistol from very far away but if you use a rifle with ironsights you will be able to headshot someone from further away. Focus speed can be improved by adding a reflex sight to your gun, and if you add a scope then you can headshot enemies quickly at any distance on the screen.
|