User:RotatcepS/AccuracyDiscussion

From Team Fortress Wiki
< User:RotatcepS
Revision as of 15:03, 18 August 2021 by RotatcepS (talk | contribs) (spread cone calculation and some notes)
Jump to: navigation, search

Bullet/Pellet Spread

Currently, accuracy is mostly represented as spread ratio on weapons that have it. This ratio is e.g. 30:1 on a shotgun. Unlike what one would think, this is not a random spread probability or similar odds ratio, instead it means "from 30 hammer units away, there will be 1 hammer unit of spread."


User Gearhart in January 2021 edited the shotgun ratio to 15:1 stating

"tested shotgun spread and found out that shotgun spread is actually 15:1, which is twice as much spread as the stated 30:1. And yes, I did go by spread radius instead of diameter."

In March that inconsistency with the Scattergun and other shotguns was noticed and questioned.


On Reddit, this 2013 post exposes the constants used for spread of all weapons and the believed meaning that this value equals "sin (degrees/2)" where degrees is believed to define the firing cone of the weapon.

In order to get a 30:1 ratio based on the shotgun's constant of 0.0675 the math is (1/tan( 0.0675 / 2)) = 29.6184 (rounding up to 30)... the division by 2 is not expected, but is the only way to get the "right" value.

TODO: was this based on code value as ratio or as angle in radians? does it make much difference? clarify and show results for both.

This gives the pistol a 50:1 ratio (recoil after first shot) where (1/tan( 0.04 / 2)) = 49.9933, the Minigun a 25:1 ratio where (1/tan( 0.08 / 2)) = 24.9867, and SMG and Revolver a 80:1 ratio (recoil after first shot) where (1/tan ( 0.025 / 2)) = 79.9958


Specifically the trigonometry is

tan( angle ) = "opposite side" / "adjacent side"

therefore

"adjacent side" = "opposite side" / tan( angle ) 

This would have "opposite side" as just the radius of the spread from the center.

The constant's division by 2 before taking the tangent implies the constant provided is the full cone diameter angle.

Leaving out the division by 2 (treating the constant as only the radius angle of cone) gives 14.7923 (rounding up to 15), matching Gearhart's edit. That would also halve all the other ratios above.

Code Value ratio ratio halved cone angle degrees(2*asin(code))
per post
cone angle (degrees(2*code))
(doubled like "ratio halved" uses)
spread-accuracy
(distance (vs. mid-range) for all spread to hit 25Hu (average bullet hitbox) width target)
0.0675 spread of 15:1 spread of 15:1 7.73° cone 7.74° cone accurate at 36% range

Projectiles/Explosives

Projectiles have a speed, a possible arc, and other factors that affect their ability to hit a projectile hitbox. Explosives have a splash radius that causes between 100% and 50% damage to anything in that radius. How can you express Accuracy with this information aside from just saying it all out loud?

speed speed-accuracy
(assuming mid-range: 512Hu)
explosive-accuracy
(distance (vs. mid-range) for splash (146Hu) to touch moving hitbox of
average player (32Hu projectile hitbox moving from impact point at 300Hu))
1100 Hu/s closes range in 0.5 seconds, accurate at 18% range splash accurate at 116% range