I doubt that the game calculate by the real time position of the arrow except for animation purposes and impact. There's no need to since medieval men didn't use Zepplins, you just need to know where and when it will land and a few other things, More likely, when an arrow impacts, it calls a command that checks if a unit's hitbox is over spot and then applies the arrow's angle and the unit's direction to figure out what defense values to apply. That's a simple version of what I would do. Even then, you could calculate the point of impact and time of impact, with parabolic arcs so you don't even need the arrow to return where it will hit.
Guy.ShootArrow() creates an instance of arrow.
If (Arrow.ImpactsGround()) then check BigArrayOfUnitsInZone[] and then check if BigArrayOfUnitsInZone[].ArrayOfIndividualMen[] is .
If it is, then call ApplyArrowDamage(Arrow, BigArrayOfUnitsInZone[].ArrayOfIndividualMen[])
Or something.
Bookmarks