Jump to content
Sign in to follow this  
CyclonicTuna

Bomb physics.

Recommended Posts

Total freefall is IMHO seems a lot better. I won't measure where a real bomb would have dropped at least. As long as it seems okay. And engine handled bomb does not seem okay at all. It seems odd. A freefall object looks natural. Actually I haven't seen a bomb falling, but you know what I mean. :)

So attach this code to your dropped bombs:

_goodGrav = 
{
   private ["_b","_velb","_vx","_vy","_vz"];

   _b = _this select 0;
   _velb = velocity _b;

   _vx = _velb select 0;
   _vy = _velb select 1;
   _vz = _velb select 2;

   _vz = 0;

   GoodGrav_prevTime = diag_tickTime;
   waitUntil //runs on each frame
   {
       _vz = _vz - 9.81 * (diag_tickTime - PrevTime);
       _b setVelocity [_vx,_vy,_vz];

       GoodGrav_prevTime = diag_tickTime;
       isNull _b // for non-exploding object add:|| ((getPosATL _b) select 2) < 1  //no ; at the end!
   };
};

[_myBomb] spawn _goodGrav;

Or make a re-configged addon. :)

Share this post


Link to post
Share on other sites
<snip>

So attach this code to your dropped bombs:

_goodGrav = 
{
   private ["_b","_velb","_vx","_vy","_vz"];

   _b = _this select 0;
   _velb = velocity _b;

   _vx = _velb select 0;
   _vy = _velb select 1;
   _vz = _velb select 2;

   _vz = 0;

   GoodGrav_prevTime = diag_tickTime;
   waitUntil //runs on each frame
   {
       _vz = _vz - 9.81 * (diag_tickTime - PrevTime);
       _b setVelocity [_vx,_vy,_vz];

       GoodGrav_prevTime = diag_tickTime;
       isNull _b // for non-exploding object add:|| ((getPosATL _b) select 2) < 1  //no ; at the end!
   };
};

[_myBomb] spawn _goodGrav;

Or make a re-configged addon. :)

You will likely want to model drag. For bombs dropped from a sizable height, I suspect that drag will considerably alter the impact point (assuming you aren't dive-bombing). Edited by jaemn

Share this post


Link to post
Share on other sites
You will likely want to model drag. For bombs dropped from a sizable height, I suspect that drag will considerably alter the impact point (assuming you aren't dive-bombing).

Yeah I'm afraid that if you want to do it properly it won't be as simple as just one tiny script. Like you said, there's things like drag to consider. But besides that there's also the simple fact that some of these munitions mainly GBU's and Jdam have variable fins that can alter the course of flight. So how is that going to affect the flightpath if a Jdam has to steer slightly? Because turning into the airstream will cause drag on on side and accelration on the other. A dumb bomb will follow an arch because it just keeps flying forward untill its exserted all of its forward momentum after which it will go into a 90 degree dive.

But as soon as you give a bomb a mind and a target you need to model lifting bodies, and that isn't that simple.

This all has to do with the fact that in real life pilots have the option to manipulate the glide path of a bomb to accomodate to certain circumstances. Maybe the target is behind a hill and the pilot can only come within a certain distance of the target, not enough to fly over. Then you can tell the Jdam to keep a shallow approach untill its just above the target and then go into a steep dive. The same goes for laser guided bombs that have home in onto a moving garget. They have the ability to adjust glidepath to strike the target pricisely.

Now I doubt wether the last possible to simulate in Arma but I think it should be possible to simulate more accurate lifting bodies along with (maybe) pre-programmable flightpath.

Edited by CyclonicTuna

Share this post


Link to post
Share on other sites

i made a very similar thread to this back in november, infact this is the first time i've logged on since and your thread was the first thread at the top of general i saw since logging in, made me so happy. Thanks Cyclonictuna, made my day to see other people want this. Big ups.

http://forums.bistudio.com/showthread.php?168173-explosions-improvement-volume-and-force&p=2552054#post2552054

Share this post


Link to post
Share on other sites
i made a very similar thread to this back in november, infact this is the first time i've logged on since and your thread was the first thread at the top of general i saw since logging in, made me so happy. Thanks Cyclonictuna, made my day to see other people want this. Big ups.

http://forums.bistudio.com/showthread.php?168173-explosions-improvement-volume-and-force&p=2552054#post2552054

You're welcome :). But just so you know, this thread isn't about the look of the explosions. Just the behaviour of airborne munitions, in the air. I'll upload a simple infographic soon the showcase exactly what the problem is.

Share this post


Link to post
Share on other sites
You will likely want to model drag. For bombs dropped from a sizable height, I suspect that drag will considerably alter the impact point (assuming you aren't dive-bombing).

He is also doing euler integration, which can have large amounts of error, compared to others. Such as improved euler or runge-kutta

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  

×