Weaponvelocity and Range
If a weapon with a ballistic trajectory does not have enough weaponvelocity, it will not be able to hit its listed range.
To hit a target at the same level as the firer, the required weaponvelocity is given as follows:
v >= sqrt(gR)
where v is the weaponvelocity, R is the desired maximum range, and g is the map gravity. If the target is directly above the firer, this becomes
v >= sqrt(2gR)
Map gravity rarely exceeds 150 or so, and most firing points are elevated above surface level, so 150 is generally a good minimum value to use for g.
Weaponvelocity and Firing Angle
More generally speaking, if the firing angle is a, the angle needed to hit a target at the same level as the firer is given by
a = arcsin(gr/v2)/2
where r is the distance to the target. From this, the following will cause the firing angle to differ more from 45 degrees:
- Low map gravity.
- A close target.
- High weaponvelocity.
High and Low Trajectory
Ignoring the possibility of intervening obstacles, there are two trajectories that will place a shot at a given point within range, which are referred to as "high" and "low" trajectory. The differences between the trajectories are outlined below for situations where the firer and target are at the same vertical level.
- The firing angles of the two trajectories differ from 45 degrees by the same amount. High trajectory fires at above 45 degrees, low trajectory below. The angle of one can be found by subtracting the angle of the other from 90 degrees. The higher angle of high trajectory makes it better at clearing obstacles.
- The time it takes for a shot to fall back to the level of its firer is given by 2v sin(a)/g. This means that a low trajectory shot will reach its target in less time: a factor of tan(a), where a is the angle of the low trajectory shot.
- The height of the shot at its peak is given by v2 sin2(a) / 2g. At 45 degrees this is a quarter of the maximum range.
- Impact velocity is the same as weaponvelocity. Impact angle is equal to the firing angle. This is true for both low and high trajectory.
Accuracy
On level terrain, low and high trajectory with (in)accuracy have the same hit distribution on the ground. The better apparent accuracy of low trajectory is due to two things: First, targets tend to stick up out of the ground, so a low trajectory shot can strike the side of the target rather than only the top. Second, low trajectory shots reach their target more quickly, meaning that it is more likely to hit a moving target with a low trajectory shot.
Again on level terrain, the further away a target is, the more accurate a weapon is in terms of falling long or short. Again, since low trajectory shots can hit the side of a target as well as the top, falling long or short is primarily an issue for high trajectory weapons. The sideways spread depends on how long the shot stays in the air; low trajectory weapons will spread more sideways as range increases, while high trajectory weapons spread more sideways at short range. In general it can be said that low trajectory weapons are more accurate at short range while high trajectory weapons are more accurate at long range.
A high gravity improves the accuracy of high trajectory weapons, as it reduces the time that a high trajectory shot stays in the air and thus the time that the shot can deviate from the intended trajectory. For low trajectory weapons, a high gravity means that the shot will spread more sideways but will not fall long or short by as much, since the weapon must aim higher to reach a particular target. Again, the fact that targets tend to stick out of the ground complicates this issue.
General Solution
The general solution is rather complex, so I've attached it (as well as derivations) to this page.
Attachments
-
ballistics.pdf
(55.6 KB) - added by evil4zerggin
2 years ago.
Derivation of ballistic equations.