trigonometry - Adjusting initial bullet angle to match user set distance(scope zero) (for math gods) -
so question pretty specific, means pretty hard find me on google or stackoverflow.
i want give users ability set distance/range on guns. have need make happen, don't have angle need add on direction angle @ bullet comes from. don't know equation/formula need this. not looking code-specific, idea of what/how this.
since not know formula use, started messing around numbers formula found:
(this formula applies actual sniper) range = 1000 * actualtargetheight/targetheightinmils(on scope) bulletdrop = bulletdropspeed*range^2/2*velocityofthebullet milstoraisescope = 1000 * bulletdrop * rangetotarget
i replaced range whatever 0 user on. have feeling toss milstoraisescope trigonometry function. i'm not sure.
if confused i'm talking about, can find example of want in battlefield 4 or of arma games. snipers, can 0 in scope on whatever distance need won't have adjust bullet drop on scope.
sorry long question, want make sure understands! :)
mils
corresponds (military) angular measurement unit of 1/1000
of radian, ready-to-use angle
second formula looks strange. height loss depends on time of flight:
dh = g*t^2/2 = g * (range / velocityofthebullet)^2 / 2
where g 9.81 m/sec^2
Comments
Post a Comment