Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2   Go Down

Author Topic: Wrestling 'gun sway' under control  (Read 806 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Wrestling 'gun sway' under control
« on: June 21, 2024, 07:58:36 PM »

Strap on an I-153P and try to keep a bead on a relatively small target while firing. While those cannon are barking the plane bucks about like a wild bronco, it being impossible to maintain a firing solution. About half the shots go wide for a target the size of a train's box car. At the very least this detracts from the fun. ;)  And I do wonder if the effect is somewhat exaggerated...

In any event, In Gun.doStartBullet() I found the code which imparts this 'sway'. I've created a conf.ini entry for the [Mods] section called "GunSwayFactor", where the player can set a value between 0.1 and 1.0. This applies an addition scaling factor to the variable passed to FM.gunPulse() and FM.gunMomentum(); at 0.1 the effect of the sway is reduced to 1/10 the intensity; at 1.0 the sway is operating to full effect. If this conf.ini entry is missing, the factor defaults to 1.0, meaning no reduction to the 'gun sway' is applied.

I've tried this out with the I-153P, and a value of 0.2 suppresses the sway very significantly; it's easy to keep all or most shot on a box car. For the Hs-129B-3/Wa's massive gun the bucking is also notably tamed. One can now fine tune this behaviour to taste.

Note: The bubble-top P-47 without fin extension (for improved lateral stability) has its slower frequency, pendulum-like sway exerted in the FM (I presume); this alteration here does not impact that different mechanism of aggravation.


Here's the relevant part of the method in Gun.doStartBullet(). Of course gunSwayFactor is instantiated and checked for validity in the range 0.1-1.0 elsewhere in the class...
Code: [Select]
if(actor instanceof Aircraft)
{
v2.set(v1);
// v2.scale(super.prop.bullet[i].massa * (float)super.prop.bulletsCluster);  //original
v2.scale(super.prop.bullet[i].massa * (double) gunSwayFactor * (float)super.prop.bulletsCluster);  //gunSwayFactor can be 0.1 to 1.0
((SndAircraft) ((Aircraft)actor)).FM.gunPulse(v2);


actor.getSpeed(v);
v1.add(v);

if(World.cur().diffCur.Wind_N_Turbulence)
{
Point3d point3d = new Point3d();
super.pos.getAbs(point3d);
World.wind().getVectorWeapon(point3d, vWind);
v1.add(-((Tuple3d) (vWind)).x, -((Tuple3d) (vWind)).y, 0.0D);
}

if(actor == World.getPlayerAircraft())
{
World.cur().scoreCounter.bulletsFire += super.prop.bulletsCluster;
if(World.cur().diffCur.Realistic_Gunnery && (((SndAircraft) ((Aircraft)actor)).FM instanceof RealFlightModel))
{
Loc loc2 = super.pos.getRel();
if(Math.abs(((Tuple3d) (loc2.getPoint())).y) < 0.5D)
{
double d1 = super.prop.bullet[i].massa * super.prop.bullet[i].speed;
v.x = World.Rnd().nextDouble(-20D, 20D) * d1;
v.y = World.Rnd().nextDouble(-100D, 200D) * d1;
v.z = World.Rnd().nextDouble(-200D, 200D) * d1;
v.scale(0.3D * (double) gunSwayFactor);  //originally 0.3 alone; gunSwayFactor can be 0.1 to 1.0
((RealFlightModel)((SndAircraft) ((Aircraft)actor)).FM).gunMomentum(v, false);
} else
{
double d2 = super.prop.bullet[i].massa * (float)super.prop.bulletsCluster * super.prop.shotFreq;
v2.set(-1D, 0.0D, 0.0D);
loc2.transform(v2);
double d4 = 0.45D * Math.sqrt(Math.sqrt(super.prop.bullet[i].massa));
d4 = 64D * World.Rnd().nextDouble(1.0D - d4, 1.0D + d4);
v2.scale(d4 * v1.length() * d2);
v.cross(loc2.getPoint(), v2);
v.y *= 0.1D;
v.z *= 0.5D;
v.scale(0.3D * (double) gunSwayFactor);  //originally 0.3 alone; gunSwayFactor can be 0.1 to 1.0
((RealFlightModel)((SndAircraft) ((Aircraft)actor)).FM).gunMomentum(v, true);
}
}
}
} else
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

SAS~Storebror

  • Editor
  • member
  • Online Online
  • Posts: 23884
  • Taking a timeout
    • STFU
Re: Wrestling 'gun sway' under control
« Reply #1 on: June 22, 2024, 12:13:10 AM »

I'd vote for some extra care here.
First, we need to differentiate between gunPulse and gunMomentum.
The gunPulse is the pure force applied by firing a bullet.
On fixed guns it usually only has an x-axis component, i.e. firing a bullet slows down your aircraft.
Other components (y/z axis) come into play when the guns aren't mounted straight or when they can move around (gunner).
In either case, no turning momentum is applied to the aircraft from gunPulse, it's simply slowing the plane down in the case of the guns mentioned here (I-153 / Henschel).
I strongly recommend not to tone down gunPulse as otherwise, you'd be starting to artificially create laser guns.

The gunMomentum in IL-2 has exactly two problems: Randomization and exaggeration for guns mounted close (<0.5m distance) to the centerline of the aircraft.
Other than that, the general idea and calculation is fine: You take the bullets mass, its speed and the dislocation from the aircraft centerline, and calculate a turning momentum from this.
IL-2 has surprisingly correct physics implemented here, but then there are the two factors mentioned above that kill everything.

It starts here:
Code: [Select]
                if(World.cur().diffCur.Realistic_Gunnery && (((Aircraft)actor).FM instanceof RealFlightModel))Fine. Only apply turning momentum to player aircraft and only if "realistic gunnery" is enabled. That's okay. AI cannot counter gun sway, and a player who doesn't want it can simply switch it off.

But this...
Code: [Select]
                    Loc loc2 = pos.getRel();
                    if(Math.abs(loc2.getPoint().y) < 0.5D)
...is bullshit already.
Why should the gun momentum be calculated any different depending on whether the gun in question is closer or further from the airplanes centerline than 0.5m?
Makes no sense at all.
The whole calculation thereafter is utterly irritating.
This...
Code: [Select]
                        double d1 = prop.bullet[i].massa * prop.bullet[i].speed;
                        v.x = World.Rnd().nextDouble(-20D, 20D) * d1;
                        v.y = World.Rnd().nextDouble(-100D, 200D) * d1;
                        v.z = World.Rnd().nextDouble(-200D, 200D) * d1;
                        v.scale(0.3D);
                        ((RealFlightModel)((Aircraft)actor).FM).gunMomentum(v, false);
...exaggerates the gunMomentum on aircraft with guns mounted 0.5m off centerline or closer, by a factor of up to 6/30/60 in x/y/z direction.
Why - on - earth?
And this...
Code: [Select]
                        double d2 = prop.bullet[i].massa * (float)prop.bulletsCluster * prop.shotFreq;
                        v2.set(-1D, 0.0D, 0.0D);
                        loc2.transform(v2);
                        double d4 = 0.45D * Math.sqrt(Math.sqrt(prop.bullet[i].massa));
                        d4 = 64D * World.Rnd().nextDouble(1.0D - d4, 1.0D + d4);
                        v2.scale(d4 * v1.length() * d2);
                        v.cross(loc2.getPoint(), v2);
                        v.y *= 0.1D;
                        v.z *= 0.5D;
                        v.scale(0.3D);
                        ((RealFlightModel)((Aircraft)actor).FM).gunMomentum(v, true);
...creates an absolutely weird tone down for small bullets and exaggerates the momentum of large bullets if the guns are mounted further than 0.5m off centerline.

All bullshit.

The whole block...
Code: [Select]
                if(World.cur().diffCur.Realistic_Gunnery && (((Aircraft)actor).FM instanceof RealFlightModel))
                {
                    Loc loc2 = pos.getRel();
                    if(Math.abs(loc2.getPoint().y) < 0.5D)
                    {
                        double d1 = prop.bullet[i].massa * prop.bullet[i].speed;
                        v.x = World.Rnd().nextDouble(-20D, 20D) * d1;
                        v.y = World.Rnd().nextDouble(-100D, 200D) * d1;
                        v.z = World.Rnd().nextDouble(-200D, 200D) * d1;
                        v.scale(0.3D);
                        ((RealFlightModel)((Aircraft)actor).FM).gunMomentum(v, false);
                    } else
                    {
                        double d2 = prop.bullet[i].massa * (float)prop.bulletsCluster * prop.shotFreq;
                        v2.set(-1D, 0.0D, 0.0D);
                        loc2.transform(v2);
                        double d4 = 0.45D * Math.sqrt(Math.sqrt(prop.bullet[i].massa));
                        d4 = 64D * World.Rnd().nextDouble(1.0D - d4, 1.0D + d4);
                        v2.scale(d4 * v1.length() * d2);
                        v.cross(loc2.getPoint(), v2);
                        v.y *= 0.1D;
                        v.z *= 0.5D;
                        v.scale(0.3D);
                        ((RealFlightModel)((Aircraft)actor).FM).gunMomentum(v, true);
                    }
                }
...should instead be this:

Code: [Select]
                if(World.cur().diffCur.Realistic_Gunnery && (((Aircraft)actor).FM instanceof RealFlightModel))
                {
                    Loc loc2 = pos.getRel();
                    v.cross(loc2.getPoint(), v2);
                    ((RealFlightModel)((Aircraft)actor).FM).gunMomentum(v, true);
                }
Period.
That's physics.
And yes, it will eliminate most of the gun momentum we see in IL-2.
Why?
Because most gun installations are symmetrical left/right and only slightly off center in z direction, so as long as the guns fire synced (which they do in the beginning and on short bursts), there will be no noticeable gun momentum at all.
Only on asymmetrical installations, or in long bursts when the guns go our of sync, you'd have a chance to see noticeable gun momentum.
But hey, again, that's physics.
Apparently Oleg wasn't happy with it, for whatever reason (arcade?), but we can and should cure it.
Not by applying an artificial number, but by fixing the root cause.

The bubble-top P-47 without fin extension (for improved lateral stability) has its slower frequency, pendulum-like sway exerted in the FM (I presume)
No, it hasn't. It's done in code.

]cheers[
Mike
Logged
Don't split your mentality without thinking twice.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Wrestling 'gun sway' under control
« Reply #2 on: June 22, 2024, 01:17:47 AM »

Mike,
Thanks for the cogent insights, which I'll be considering carefully. I fully agree that a reasoned, physics-based approach beats an ad hoc, pulled-from-the-arse 'correction.'  ;)

Indeed, weapons arrayed in a bi-laterally symmetrical manner tend to cancel out their induced turning moments. Even if not firing in sync, for reasonably rapid RPM the interval between recoil pulses is brief enough for momentum to keep each swing event quite small.

As for the risk/fear of creating 'laser guns', there is the weapon property,  maxDeltaAngle which applies a randomized aim offset within the limit set therein. Of course, this applies to all installations of that weapon, which can be varied enough that a single envelope of variance will not necessarily be appropriate for all.

I'm going to try your suggestions and code snippet and see how things behave.

Thanks again!
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Vampire_pilot

  • member
  • Offline Offline
  • Posts: 8552
Re: Wrestling 'gun sway' under control
« Reply #3 on: June 22, 2024, 02:09:28 AM »

I would be much interested in such a mod.

I was working on the XF5F, which has four .50cal clustered in the nose, close together. With the torque compensating counter rotating props one would imagine it is a sniper platform. Far from it, it swings like a drunk.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Wrestling 'gun sway' under control
« Reply #4 on: June 22, 2024, 03:06:01 AM »

Mike,
So I restored the gunPulse, it being a measure of recoil. And I used your highly condensed algorithm for the gunMomentum. As you surmised, the sway was hugely reduced. Indeed, the resulting stability for the two test beds, the I-153P and the monster-gunned Hs-129, was better than my simple reduction factor of 0.1, or a mere 10% of the stock induced motion (which was why I went with the larger value of 0.2).

Perhaps it is nearer to reality, for symmetrical gun arrangements at least, to employ this much reduced sway. It agrees with my own gut feelings to start with.


As for the bubble-top P-47 sans extra fin area, I tried the following change in P_47ModPack.bubbleTopTailSway(). The first line is the original, with values of 1 and 2 being selected based on the trigger pulled. Due to the squaring when obtaining fSwayfactor later on, this results in a factor of 4 difference, which seems rather large given the close groupings of gun pairings in each group of 4. Now with these variants of the P-47, all 8 guns are fired with the one primary trigger. But the weird thing is that even when I pull the secondary trigger there is an induced sway, as though 'ghost guns' are firing.  :D On the replacement line I altered the values of 1 and 2 to 0.7 and 0.9, respectively. This greatly diminishes the gun-induced sway, leaving some small amount present while firing. It's perhaps just about as large an additional component as the ever present yaw variance from just flying the slightly (and annoyingly ;) ) unstable crate.

Code: [Select]
//        float fGunFactor = !((FlightModelMain) (super.FM)).CT.WeaponControl[0] && !((FlightModelMain) (super.FM)).CT.WeaponControl[1] ? 1.0F : 2.0F;
        float fGunFactor = !((FlightModelMain) (super.FM)).CT.WeaponControl[0] && !((FlightModelMain) (super.FM)).CT.WeaponControl[1] ? 0.7F : 0.9F;


Vamps,
I've heavily altered Gun.class with other refinements for my upcoming v2.0 effects pack. I could offer the stock class with just the gun-induced sway change, for those not using my effects mod (the current release, v1.6, does have some changes made to this class)...
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Wrestling 'gun sway' under control
« Reply #5 on: June 22, 2024, 10:54:47 AM »

Before I release Gun.class with Mike's condensed 'gun sway' algorithm, I wanted to be certain that the value for v2 as used to find the cross product of v and which is passed to FM.gunMomentum is valid. I highlight the two lines in question with "//=============="

Full method in Gun.class:
Code: [Select]
    public void doStartBullet(double d)
    {
        int i = nextIndexBulletType();
        long l = Time.tick() + (long)((double)Time.tickLenFms() * d);
        pos.getTime(l, loc);
        Loc loc1 = loc;
        Orient orient;
        if(prop.maxDeltaAngle > 0.0F)
        {
            orient = loc.getOrient();
            float f = (float)World.Rnd().nextGaussian() * prop.maxDeltaAngle * 0.37F * qualityModifier;
            f = clampA(f, prop.maxDeltaAngle * 3F);
            float f1 = (float)World.Rnd().nextGaussian() * prop.maxDeltaAngle * 0.173F * qualityModifier;
            f1 = clampA(f1, prop.maxDeltaAngle * qualityModifier * 2.0F);
            if((this instanceof CannonAntiAirGeneric) || (this instanceof MGunAntiAirGeneric))
            {
                f = (float)((double)f * 0.25D);
                f1 = (float)((double)f1 * 0.25D);
            }
            orient.increment(f, f1, 0.0F);
        } else
        {
            orient = loc1.getOrient();
        }
        v1.set(1.0D, 0.0D, 0.0D);
        vWind.set(0.0D, 0.0D, 0.0D);
        orient.transform(v1);
        v1.scale(prop.bullet[i].speed);
        Actor actor = getOwner();
        if(actor instanceof Aircraft)
        {
            v2.set(v1);
            v2.scale(prop.bullet[i].massa * (float)prop.bulletsCluster);
            ((Aircraft)actor).FM.gunPulse(v2);
            actor.getSpeed(v);
            v1.add(v);
            if(World.cur().diffCur.Wind_N_Turbulence)
            {
                Point3d point3d = new Point3d();
                pos.getAbs(point3d);
                World.wind().getVectorWeapon(point3d, vWind);
                v1.add(-vWind.x, -vWind.y, 0.0D);
            }
            if(actor == World.getPlayerAircraft())
            {
                World.cur().scoreCounter.bulletsFire += prop.bulletsCluster;

/*  //this block introduces weird emphasis on weapons placed within 0.5m of the axis of symmetry as well as on bullet mass
                if(World.cur().diffCur.Realistic_Gunnery && (((Aircraft)actor).FM instanceof RealFlightModel))
                {
                    Loc loc2 = pos.getRel();
                    if(Math.abs(loc2.getPoint().y) < 0.5D)
                    {
                        double d1 = prop.bullet[i].massa * prop.bullet[i].speed;
                        v.x = World.Rnd().nextDouble(-20D, 20D) * d1;
                        v.y = World.Rnd().nextDouble(-100D, 200D) * d1;
                        v.z = World.Rnd().nextDouble(-200D, 200D) * d1;
                        v.scale(0.3D);
                        ((RealFlightModel)((Aircraft)actor).FM).gunMomentum(v, false);
                    } else
                    {
                        double d2 = prop.bullet[i].massa * (float)prop.bulletsCluster * prop.shotFreq;
                        v2.set(-1D, 0.0D, 0.0D);
                        loc2.transform(v2);
                        double d4 = 0.45D * Math.sqrt(Math.sqrt(prop.bullet[i].massa));
                        d4 = 64D * World.Rnd().nextDouble(1.0D - d4, 1.0D + d4);
                        v2.scale(d4 * v1.length() * d2);
                        v.cross(loc2.getPoint(), v2);
                        v.y *= 0.1D;
                        v.z *= 0.5D;
                        v.scale(0.3D);
                        ((RealFlightModel)((Aircraft)actor).FM).gunMomentum(v, true);
                    }
                }
*/
//Storebror's suggested simplification of the block above
                if(World.cur().diffCur.Realistic_Gunnery && (((Aircraft)actor).FM instanceof RealFlightModel))
                {
                    Loc loc2 = pos.getRel();
                    v.cross(loc2.getPoint(), v2);  //=================================================
                    ((RealFlightModel)((Aircraft)actor).FM).gunMomentum(v, true);  //=================================================
                }

            }
        } else
        if(getSpeed(v) > 0.0D)
            v1.add(v);
        if((actor instanceof NetGunner) && World.isPlayerGunner())
            World.cur().scoreCounter.bulletsFire += prop.bulletsCluster;
        Bullet bullet = createNextBullet(vWind, i, this, loc1, v1, Time.current() + (long)(int)(prop.bullet[i].timeLife * 1000F));
        bullet.move((float)((1.0D - d) * (double)Time.tickLenFs()));
        bullet.bMoved = true;
        bullet.flags |= 0x1000;
        if(Config.isUSE_RENDER() && bulletNum % prop.traceFreq == 0)
        {
            bullet.flags |= 0x80000000;
            if(prop.bullet[i].traceTrail != null)
            {
                com.maddox.il2.engine.Camera3D camera3d = Main3D.cur3D().camera3D;
                if(Actor.isValid(camera3d))
                {
                    double d3 = 1000000D;
                    Point3d point3d1 = loc1.getPoint();
                    v1.scale(prop.bullet[i].timeLife);
                    p1.add(point3d1, v1);
                    Point3d point3d2 = ((Actor) (camera3d)).pos.getAbsPoint();
                    double d5 = p1.x - point3d1.x;
                    double d6 = p1.y - point3d1.y;
                    double d7 = p1.z - point3d1.z;
                    double d8 = d5 * d5 + d6 * d6 + d7 * d7;
                    double d9 = ((point3d2.x - point3d1.x) * d5 + (point3d2.y - point3d1.y) * d6 + (point3d2.z - point3d1.z) * d7) / d8;
                    if(d9 > 0.0D && d9 < 1.0D)
                    {
                        double d10 = point3d1.x + d9 * d5;
                        double d12 = point3d1.y + d9 * d6;
                        double d14 = point3d1.z + d9 * d7;
                        double d15 = (d10 - point3d2.x) * (d10 - point3d2.x) + (d12 - point3d2.y) * (d12 - point3d2.y) + (d14 - point3d2.z) * (d14 - point3d2.z);
                        if(d15 > d3)
                            return;
                    } else
                    {
                        double d11 = (p1.x - point3d2.x) * (p1.x - point3d2.x) + (p1.y - point3d2.y) * (p1.y - point3d2.y) + (p1.z - point3d2.z) * (p1.z - point3d2.z);
                        double d13 = (point3d1.x - point3d2.x) * (point3d1.x - point3d2.x) + (point3d1.y - point3d2.y) * (point3d1.y - point3d2.y) + (point3d1.z - point3d2.z) * (point3d1.z - point3d2.z);
                        if(d13 > d3 && d11 > d3)
                            return;
                    }
                    bullet.effTrail = Eff3DActor.NewPosMove(pos.getAbs(), 1.0F, prop.bullet[i].traceTrail, -1F);
                }
            }
        }
    }
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Wrestling 'gun sway' under control
« Reply #6 on: June 22, 2024, 11:16:45 AM »

The more I ponder this, with Mike's insights keeping me on the path to understanding, the more it seems that gun-induced sway is to a good extent an artificial 'difficulty' factor. To be sure, if one plays with no wind 'n turbulence in effect, no recoil-related vibrational head shake enabled and no slower frequency gunfire-induced sway in effect, it can seem as though shot is almost laser-accurate guided. (Although the weapon property "maxDeltaAngle", which adds a Gaussian random divergence of shot from the aim point whether realistic gunnery is enabled or not, simulates the weapon's small shifting in its mount.) And so I can see why the developer might be inspired to build in some additional degradation to stability for the player.

I pretty much always have a light wind with light turbulence in effect, and this goes a long way to imparting a sense of the plane being not so much a rock-steady platform. To this end, I significantly re-worked Wind.class. The old stock implementation strangely bypassed gentler intensities for turbulence and gusts (the latter particularly!), making these effects a horror that repelled many players from enabling them.


When I think on the geometric precision of AI-controlled AAA fire, where the shot stitches out perfectly straight line segments on impact with ground/water or terminal bursts in the air, it makes me wonder about introducing some additional divergence that will result in a less machine-like artificiality.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Wrestling 'gun sway' under control
« Reply #7 on: June 22, 2024, 11:32:40 AM »

About AAA fire stitching out beautifully straight line segments, here's a contributor to that from the same method I've been dealing with in Gun.class. Note how the Gaussian departure from the aim point, as controlled by the weapon property "maxDeltaAngle" is reduced by a factor of 4 (multiplied by 0.25) for "AntiAir" weapons. Why would that be desirable? I can see how this could be of concern for track playback, because the difference in the aim error applied during playback from the actual error during play can result in the oddity of playback misses nonetheless hitting as was done during play.

I'm going to try an experiment where this factor of 4 reduction is not done, and see what happens. ;)

Code: [Select]
        if(super.prop.maxDeltaAngle > 0.0F)
        {
            orient = loc.getOrient();
            float f = (float)World.Rnd().nextGaussian() * super.prop.maxDeltaAngle * 0.37F * qualityModifier;
            f = clampA(f, super.prop.maxDeltaAngle * 3F);
            float f1 = (float)World.Rnd().nextGaussian() * super.prop.maxDeltaAngle * 0.173F * qualityModifier;
            f1 = clampA(f1, super.prop.maxDeltaAngle * qualityModifier * 2.0F);
            if((this instanceof CannonAntiAirGeneric) || (this instanceof MGunAntiAirGeneric))
            {
                f = (float)((double)f * 0.25D);
                f1 = (float)((double)f1 * 0.25D);
            }
            orient.increment(f, f1, 0.0F);
        } else
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Wrestling 'gun sway' under control
« Reply #8 on: June 22, 2024, 11:54:01 AM »

After a test to let the AAA guns suffer the full extent of their aim error as defined by the weapon property maxDeltaAngle, by removing the application of the factor of 4 reduction pointed out in the previous post. In these images there are no more essentially dead straight segments of impacts or air bursts. In the water hits particularly, note also the instances of irregular clumping for some bursts. This looks so much more 'organic' to me.

[click images for larger]


Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Frankiek

  • SAS Team
  • member
  • Online Online
  • Posts: 2878
Re: Wrestling 'gun sway' under control
« Reply #9 on: June 22, 2024, 02:22:29 PM »

Anything that can reduce the super sniper AA is welcome
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6013
Re: Wrestling 'gun sway' under control
« Reply #10 on: June 22, 2024, 04:40:46 PM »

For reference, here's the list of B.A.T. 4.0 weapons (and some base classes) in which the maxDeltaAngle is specified, arranged in order of increasing value. The units are degrees, and the number might be thought of as the 1- or 2-sigma value. Note the zero or very small angle supplied for larger calibres. I presume this is an indication of solid steadiness when firing. But I should think that some recoil-induced deviation ought to be operative for some number of them...

The "AntiAir" weapons tend to have no such property included, and so their parent classes calculate either a fixed value of 0.2, or a range between 0.1 and 0.3 if a particular variable is > 0. Furthermore, in the stock scheme these values are reduced by a factor of 4, and so effectively the range of angle is 0.025 to 0.075. Compare this to the median value in this list of about 0.23 degrees. My own restoration of the AntiAir angles to the non-reduced values initially determined is more in line with other weapons. And I like it.  ;)

Code: [Select]
weapon class    maxDeltaAngle(deg.)

CannonTST 0
MachineGunTST 0
MGun105mm 0
MGun410mm 0
MGun75mm 0
MGunB20t 0
MGunBK37JU87 0
MGunBK5_AP 0
MGunBK5_HE 0
MGunBK75 0
MGunHo301s 0
MGunM4s 0
MGunM4_75 0
MGunM9s 0
MGunMG151s 0
MGunMK214A 0
MGunMolins_57 0
MGunMolins_57AP 0
MGunMolins_57HE 0
MGunMolins_57MIX 0
MGunNull 0
MGunVickers40mmk 0.01
MGunVickers40mms 0.01
MGunBK374Hs129 0.02
MGunType94 0.02
MGunType94AP 0.02
MGunMK101s_Hs129 0.03
MGunMK352s 0.03
MGunMK103APsi 0.054
MGunMK103s_Hs129 0.06
MGunShVAKANTIMATTERs 0.07
MGunMG213MGs 0.08
MGunBofors40 0.09
MGunMG17s 0.09
MGunVickers40mmAPk 0.09
MGunVickers40mmAPs 0.09
MGunVz30s 0.09
MGunHispanoMkISkys 0.1
MGunJu88PaK40 0.1
MGunM6115ki 0.1
MGunM6120ki 0.1
MGunPaK40 0.1
MGunUBs 0.1
MGunBK37 0.11
MGunMG131si 0.11
MGunMG17si 0.11
MGunMG81s 0.11
MGunUBsi 0.11
MGunVikkersKs 0.11
MGunVikkersKsi 0.11
MGunB20si 0.12
MGunHispanoMkIkNT 0.12
MGunHispanoMkIs 0.12
MGunHo103s 0.12
MGunHo103si 0.12
MGunHo3s 0.12
MGunHo5s 0.12
MGunHo5si 0.12
MGunMG131NTs 0.12
MGunMG131s 0.12
MGunMG81t 0.12
MGunNS23s 0.12
MGunOerlikonFFS 0.12
MGunShVAKsi 0.12
MGunShVAKsii 0.12
MGunType992sii 0.12
MGunBrowning303t_GB 0.1227
MGunMAC1934t 0.1227
MGunB20k 0.14
MGunB20ki 0.14
MGunB20s 0.14
MGunShVAKk 0.14
MGunShVAKki 0.14
MGunShVAKs 0.14
MGunShVAK_flaccid_paralysisS 0.14
MGunShVAK_flaccid_paralysisSI 0.14
MGunVYas 0.14
MGunVYasi 0.14
MGun152mm 0.15
MGunMG17t 0.15
Type99G2M4ns 0.15
MGunDarne1933si 0.157
MGunTsUB 0.16
MGunTsUBi 0.16
MGunBredaSAFATt77st 0.1627
MGunBrowning303ki_GB 0.1627
MGunBrowning303k_GB 0.1627
MGunBrowning303si_GB 0.1627
MGunBrowning303s_GB 0.1627
MGunLKk42s 0.17
MGunLKk42si 0.17
MGunUBS_flaccid_paralysisS 0.17
MGunUBS_flaccid_paralysisSI 0.17
CannonAntiAirGeneric 0.2
CannonLongrangeGeneric 0.2
CannonMidrangeGeneric 0.2
CannonTankGeneric 0.2
MGunAntiAirGeneric 0.2
MGunHispano404 0.2
MGunHispanoLeo 0.2
MGunHispanoMkIsi 0.2
MGunHispanoMkIsii 0.2
MGunMG15t 0.2
MGunTankGeneric 0.2
MGunTsHispano404 0.2
MGunTsHispano404i 0.2
MGunTsOerlikonS 0.2
MGunTsOerlikonSi 0.2
MGunTsShVAK 0.2
MGunTsShVAKi 0.2
MGunBredaSAFATSM127s 0.209
MGunScotti127s 0.209
MGunMG131ki 0.21
MGunMG131tu 0.21
MGunMG17k 0.21
MGunN57s 0.21
MGunNS45s 0.21
MGunUBk 0.21
MGunUBki 0.21
MGunDA762s 0.22
MGunMG17ki 0.22
MGunVikkersKk 0.22
MGunVikkersKki 0.22
MGunVikkersKt 0.22
MGunBredaSAFAT127k 0.229
MGunBredaSAFAT127ki 0.229
MGunBredaSAFAT127s 0.229
MGunBredaSAFAT127si 0.229
MGunBredaSAFAT127t 0.229
MGunBrowning50APIT 0.229
MGunBrowning50k 0.229
MGunBrowning50kAPIT 0.229
MGunBrowning50kiAPI 0.229
MGunBrowning50MIX 0.229
MGunBrowning50NT 0.229
MGunBrowning50s 0.229
MGunBrowning50si 0.229
MGunBrowning50t 0.229
MGunBrowning50tAPI 0.229
MGunBrowning50tdual 0.229
MGunBrowning50tj 0.229
MGunBrowning50tjAPI 0.229
MGunBrowningFN132 0.229
MGunBrowningnew50k 0.229
MGunTsSAFAT127 0.229
MGunTsSAFAT127i 0.229
MGunMK213s 0.23
MG15120IAR 0.24
MGunHispanoMkIk 0.24
MGunHispanoMkIki 0.24
MGunHispanoMkInt 0.24
MGunHispanoMkISkyCorF 0.24
MGunHispanoMkIt 0.24
MGunHo103k 0.24
MGunHo103ki 0.24
MGunHo103t 0.24
MGunHo5k 0.24
MGunHo5ki 0.24
MGunHo5t 0.24
MGunMG131k 0.24
MGunTsMAC1934 0.24
MGunTsMAC1934i 0.24
MGunTsOerlikonF 0.24
MGunTsOerlikonFi 0.24
MGunType99No1t 0.24
MGunType99No2t 0.24
MGunHispanoMKVk 0.246
MGunDarne1933 0.25
MGunDarne1933t 0.25
MGunLewisMkIIt 0.25
MGunMAC1934Leo 0.25
MGunMG15120MGsi 0.25
MGunMG15120MGsii 0.25
MGunMG15120MGt 0.25
MGunMG15120nts 0.25
MGunMG15120si 0.25
MGunMG15120sn 0.25
MGunMG15120t 0.25
MGunMG151k 0.25
MGunMG151ki 0.25
MGunMG151t 0.25
MGunMG15s 0.25
MGunUBt 0.25
MGunVz30t 0.25
MGunMG81si 0.27
MGunMauser213C 0.28
MGunMG15120k 0.28
MGunMG15120kh 0.28
MGunMG15120ki 0.28
MGunMG15120MGk 0.28
MGunMG15120MGkh 0.28
MGunMG15120MGki 0.28
MGunMG15120MGs 0.28
MGunMG15120NAG 0.28
MGunMG15120NAG2 0.28
MGunMG15120nt 0.28
MGunMG15120s 0.28
MGunMG213C20ki 0.28
MGunMG213C20s 0.28
MGunMG213MGki 0.28
MGunMGFFIAR 0.28
MGunMGFFs 0.28
MGunSpandauMaxim08s 0.28
MGunTsSAFAT77 0.28
MGunTsSAFAT77i 0.28
MGunTsShKAS 0.28
MGunTsShKASi 0.28
MGunType99No1s 0.28
MGunType99No2s 0.28
MGunVickersMaximMkIs 0.28
MGunVYak 0.28
MGunVYaki 0.28
CannonAntiAirGeneric 0.3
CannonLongrangeGeneric 0.3
CannonMidrangeGeneric 0.3
CannonTankGeneric 0.3
MGunAntiAirGeneric 0.3
MGunBreda20_Ca309 0.3
MGunMadsen20 0.3
MGunMK208s 0.3
MGunShKASsi 0.3
MGunTankGeneric 0.3
MGunLewisMkII 0.31
MGunPV1 0.31
MGunShKASs 0.31
MGunBredaSAFAT77s 0.32
MGunBredaSAFATSM77s 0.32
MGunBrowning303s 0.32
MGunBrowning303sipzl_fullTracers 0.32
MGunBrowning303sipzl_NoTracers 0.32
MGunBrowningFN75s 0.32
MGunBrowningFN792 0.32
MGunBrowningFN792i 0.32
MGunHo203s 0.32
MGunMAC1934 0.32
MGunN37s 0.32
MGunNS37s 0.32
MGunBrowning50kAPI 0.349
MGunMG131t 0.35
MGunMG131tj 0.35
MGunMK103k 0.35
MGunMK103ki 0.35
MGunMK103nk 0.35
MGunMK103nt 0.35
MGunMK103s 0.35
MGunMK103si 0.35
CannonRocketSimple 0.4
MGunBredaSAFAT77t 0.42
MGunBrowning303t 0.42
MGunSh37k 0.42
MGunSh37ki 0.42
MGunSh37s 0.42
MGunShVAKt 0.42
MGunHo115k 0.43
MGunHo115ki 0.43
MGunHo115s 0.43
MGunHo115si 0.43
MGunHo115t 0.43
MGunMK108k 0.43
MGunMK108kh 0.43
MGunMK108ki 0.43
MGunMK108kpzl 0.43
MGunMK108nt 0.43
MGunMK108s 0.43
MGunMK108si 0.43
MGunMK108t 0.43
MGunMK213ki 0.43
MGunTsType5Mi 0.43
MGunType2s 0.43
Type5M1ot 0.43
MGunBredaSAFAT77k 0.44
MGunBredaSAFAT77ki 0.44
MGunBrowning303k 0.44
MGunBrowning303ki 0.44
MGunBrowning303kwpzl 0.44
MGunBrowning303k_jap 0.44
MGunBrowning303k_NoTracers 0.44
MGunBrowning303Trak 0.44
MGunVYat 0.44
MGunMG15ki 0.5
RocketBomb 0.5
RocketPB 0.5
MGunMG15k 0.51
MGunMG81k 0.56
MGunMG81ki 0.56
MGunShKASki 0.59
MGunMK103t 0.6
MGunShKASk 0.62
MGunShKASt 0.62
Missile 0.68
RocketR4M 1.75
RocketR4MPB2_DZZ 1.75
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Kopfdorfer

  • member
  • Offline Offline
  • Posts: 2163
  • PULVERIZER
Re: Wrestling 'gun sway' under control
« Reply #11 on: June 23, 2024, 05:47:33 AM »

You are probably going to hate me , but . . .
please don't forget an algorithm to account for when (Wing) guns are damaged or destroyed
as the resistance (for symmetrically balanced sets of wing guns) will no longer be
symmetrical.
No doubt you guys were already taking this eventuality into account .

Kopfdorfer
Logged
Pages: [1] 2   Go Up
 

Page created in 0.034 seconds with 25 queries.