Hitscan spread changes depending on the on view angle
The spread that gets applied to hitscans from the player's weapon seems to depend on the angle the player is looking at. For example, if you fire the super shotgun while looking straight ahead, it behaves as expected, with hitscans covering a wide range. The higher you look up (or the more you look down), the tighter this spread becomes. When looking straight up, all of the hitscans hit in the exact same place. But what I would expect is for the same kind of spread to occur.
Fixed|Doom: Bullet trajectories when looking up and down
Apply a true 3D rotation to bullet trajectories when calculating random variations of individual bullets. This fixes the problem that looking up/down at a steep angle would cause the trajectories to get smaller offsets.
All the bullet-firing weapons are affected: pistol, shotgun, super shotgun, chaingun.
#2 Updated by skyjake over 1 year ago
This happens because the random variations of the bullet directions are not applied in true 3D. The direction is specified as a yaw angle and a Z slope, and the variations simply modify those values with small offsets.
What is needed is to calculate the bullet direction changes as 3D vectors and then convert those back to corresponding angle + slopes.