Jump to content
Sign in to follow this  
Julie Lux

Need little help to make a ballistic mod.

Recommended Posts

Hi, I'm making a firing table mod without ACE (so with the vanilla Arma 3 ballistic) using Mildots. Anyone knows how to calculate the ballistic on vanilla ?

 

For example:

 

 

initspeed=900;

airFriction=-0.00085;

 

Target's Range: 750 meters

 

 

Question 1: What's the equation to know the bullet drop in cm ? (in Arma 3 ofc)

 

Question 2: What's the equation to know the time in seconds between the shot and the impact ?

Share this post


Link to post
Share on other sites

Hi Julie,

 

What you ask is really huge.

 

Try checking ACE ballistics open source code.

 

Best!

Share this post


Link to post
Share on other sites

Hi, why it's really huge ?

 

I'm newbie in modding. Idk if i'm able to find the answer in the ACE's source code. In which file and lines should I search ?

Share this post


Link to post
Share on other sites

Question 1: What's the equation to know the bullet drop in cm ? (in Arma 3 ofc)

velocity += ((velocity* (magnitude(velocity) *airFriction)) + (upVector * -GravityConstant* coefGravity)) * deltaT


And that every Frame.

velocity is the 3D velocity vector of the bullet.
GravityConstant is 9.8066

upVector is just a normalized vector pointing upwards.
coefGravity and airFriction are from ammoconfig.
deltaT is time since last simulation.

 

Question 2: What's the equation to know the time in seconds between the shot and the impact ?

magnitude((((velocity* (magnitude(velocity) *airFriction))*deltaT)*deltaT) = distanceToTarget

I think that might work.
 


Have fun.

Share this post


Link to post
Share on other sites

Thank you dedmen that starts to help but are you sure that those equations are supposed to give the bullet drop after a known range ? (in our example: 750 meters )

 

And I dont understand what "+=" means in the first equation and why the secondes finish by "= distanceToTarget" while we search the time between shot and impact ?

 

 

Could you give us a concret example ? For instance: an M320 bullet drop and time before impact with a target at 750m ?

Share this post


Link to post
Share on other sites
On 5.11.2017 at 5:55 PM, dedmen said:

GravityConstant is 9.8066

In Arma Gravity constant is 9.81

 

There are multiple ballistic calculators for Arma in form of excel macro tables, Julie. Just google for them.

Share this post


Link to post
Share on other sites
5 hours ago, x3kj said:

In Arma Gravity constant is 9.81

 

There are multiple ballistic calculators for Arma in form of excel macro tables, Julie. Just google for them.

Nope it's not.

Share this post


Link to post
Share on other sites

dedmen can you answer me ? I have found answer for the operator += but not for the rest of my questions :/

 

x3kj excel table doesn't help me. I'm looking for the formula.

Share this post


Link to post
Share on other sites

Making a ballistics system is a nice project. But may I ask why you try to redo whats allready done?

 

I mean, you can just pick merely the ace ballistics pbos without all the other featres and beng, you got vanilla with ballistics only.

 

Don't mean to critisice your plan. Im genuinly asking why you are reinventing the wheel.

Share this post


Link to post
Share on other sites

@Julie Lux are you looking for real world equations or Armaverse equations? Those two are different and create a little bit of misunderstanding from my experience but they apply to the same dynamic set of items within the game.

 

The way to calculate bullet drop over distance is a huge calculation that is based on a 4 dimensional slope equation and in order to calculate drop you need to account for ballistic jump (rise); as well as charge of the powder, spin of the projectile, length of the barrel the projectile is coming out of and weight of the projectile as well as barometric pressure, wind (probably not needed for vanilla) and a myriad of other items. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×