Head-Fake Targeting
Jump to navigation
Jump to search
Quick and Dirty
- The fast way to code it.
Take any targeting method you already have (other than Head-On Targeting) and find the predicted difference in angle from dead-on. Shoot at the opposite angle (compared to dead-on). (e.g. your opponent is at 15 degrees, your circular targeting says to fire at +20 degrees, you fire at 355 degrees.)
Realistic
- The proper way to code it.
Create a new targeting method based on any targeting method you already have (other than Head-On Targeting). Assume your opponent will accelerate at top speed in the opposite direction. Extrapolate his position until you have an acceptable firing solution.