|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005680||Spring engine||General||public||2017-07-31 16:59||2017-07-31 17:17|
|Priority||low||Severity||minor||Reproducibility||have not tried|
|Product Version||103.0 +git|
|Target Version||Fixed in Version|
|Summary||0005680: Projectile leading might be wrong|
It takes the projectile ETA to *current* target position (L 1212) and then aims at the spot that the target will be after this time (L 1213). That other spot might not have the same ETA.
See attached picture.
|AC| = 100
|BC| = 200
|AB| = 100*sqrt(3) = 173
Unit A wants to shoot at B with a 10 speed weapon.
B is moving towards C at speed 5.
ETA to current pos: 173 distance / 10 speed = 17 time.
After 17 time, B will be at point D, so unit A shoots at point D.
However |AD| = 108 so the weapon will be there after 0000013:0000011 time, which is 6 time before B arrives there.
The correct place to shoot would be about 60 distance from B which is 120 distance from A, so that both the projectile and the unit arrive after 12 time.
In general the equation only works when the target is moving in a circle around C (so that distance to current pos == distance to leading target pos).
|Additional Information||This sounds somewhat hard in that there are multiple subproblems to consider:|
* what if the unit is moving away faster than the projectile? That makes the lead pos not exist. Currently there always exists a lead pos, however inaccurate.
* performance. Doing this correctly requires solving quadratic equations, sounds way slower than current.
|Tags||No tags attached.|
|Checked infolog.txt for lua Errors|
|That ticket link was "after approx. 11 time" and the last sentence of descriptions should read "circling around A".|
Known. The lead inaccuracy becomes problematic only with projectiles that move slowly relative to units, most of the time it is hidden by unit collision volumes not being points.
Major rabbit holes should not be entered right before a release.
|2017-07-31 16:59||sprung||New Issue|
|2017-07-31 16:59||sprung||File Added: leading.png|
|2017-07-31 17:03||sprung||Note Added: 0018144|
|2017-07-31 17:17||Kloot||Note Added: 0018145|