I've actually thought a bit on how you would calculate a hit% for the gui in a ballistics system, couldn't think of anything better than "run as many simulations as you can within the space of one frame and draw that number, update while hovering".
How about setting a plane perpendicular to the shooting direction at the distance of the target. Then, cutting the plane by the sides of the aiming cone and taking the percentage of the area occupied by the target as the hit chance? Hope you understand it, that is if I managed to explain myself well enough.
Edit: Technically, this could be easily done on the GPU. By creating a perspective from the weapon with the aiming cone as the FOV and drawing to the depth or stencil buffer. Then getting the portion of the target rendering from the rest of the "picture".
That would probably work, though it would also be a bit demanding, even when using GPU. Certainly faster than running a number of simulations, though.
And also, this is just for a bullet, or generally things that fly more or less in a straight line. What about grenades?
I don't think there is an easy
and very fast way of doing this accurately, though there are certainly many ways.
It's also not clear (yet,
UnstableVoltage ?) if they are even going for a perfectly accurate % display or just do it in an easy & "good enough" way.
Just something along the lines of "how likely is the soldier to execute a perfect shot?" would probably suffice in most situations, but might be somewhat off occasionally.
And this is just one of the many things to deal with when pulling the full ballistic simulation stunt. I really hope they know what they are doing...
As much as I'd love to see a well done bullet simulation including, as a developer myself, all of that complexity, work and the large tail of things that it requires to make it work just sets off my alarm bells.
I'd constantly be thinking "isn't there a good-enough approach that only requires 1/10th of the work so we can put more resources into more important stuff?"