This sounds like it's along the correct lines. It can't actually be using the test for when the arrow hits the ground, as some line-drive arrow trajectories would be calculated as hitting the ground way behind the man that ought to be getting hit. However if no unit is taller than say 10 feet, checking above that height can be entirely avoided, which helps a lot.Originally Posted by antisocialmunky
We also already know that the game calculates a firing trajectory based on what is in the way, so we can assume that if a man's hitbox is intersecting the arrow flight path, the game already knows about it since that level of collision detection (with the flight path, since it has to be preplotted) is already necessary to path the arrows correctly (avoiding the FF kills of RTW due to archers shooting their front row in the back of the head, as well as walls and trees and all manner of other things). That is to say, the game can see everything that intersects the flight path since it must to plot an unobstructed arrow path, and it will just choose to ignore men that do so on the downward portion of flight as they are targets. That being the case, all that remains is to see if something (it can only be a man at this point since the game plots around everything else) intersects the flight path during flight. If not, the arrow obviously falls harmlessly to the ground. If so, then you could check to see if the man still obstructs the flight path when his position is reached by the arrow, at which point he'd be hit. It should likewise be easy to tell when something closer gets in the way, at which point you'd track that man until he is no longer in the way, or the arrow reaches his position and he is hit.
Note that I'm not saying this is what the game is doing, or even speculating that, I'm just laying down a framework so people can have a better idea what could be going on, as few people probably have much knowledge about hit detection or what it might entail.
Bookmarks