Profile image

Today I learned... What *NOT* to do with your cockpit when you have Machineguns!

4,302 Formula350  3.4 years ago

Thought I'd share this for anyone else that is inexperienced enough with building planes and actually trying to have them work like you designed... :P

The rotation of the Cockpit, ie around the X/Y/Z axiis, impacts the Gun's aiming crosshairs! (At least as far as the small Triangle shaped [center-piece] version of the Angled Windscreen style are concerned.)
So if you do rotate the cockpit, you'll want to be sure the rotate the Machineguns to match, or else they won't be on-target with the provided crosshairs.


I couldn't figure out why my trio of guns that had been shooting at the crosshairs, suddenly were now shooting WAY low. Since these were machineguns which just shoot flat-trajectory bullets (as does the gatling gun), it wasn't due to any kind of bullet-drop physics like the cannons have.

Nope, it was literally because I had tilted my cockpit back at 355deg (X axis) to match another angle I was hiding it behind!
Once I moved it back to 0deg, it was pointing where the bullets where going.
(of course, there was still a slight deviation of where it's showing up and where "centerline" on my plane is, but that's a legitimate bug and I can't do anything about that, besides offsetting the cockpit a few hundred-thousands from 0.000)

  • Log in to leave a comment
  • Profile image

    @Formula350 Stray shots are a major issue in warfare, particularly explosives. Thankfully, US warplanes almost always used .50 caliber Browning machineguns, which couldn't use explosive ammunition.

    However, after the war, the USAF switched to using dumbfire rockets and that did cause some problems when a target drone got loose and the Airforce accidentally set a town on fire trying to bring it down.

    +1 3.4 years ago
  • Profile image
    4,302 Formula350

    @F104Deathtrap True, but I meant in terms of shooting, period. Anything that misses the target at close range, would have an exacerbated down-range area of impact due to this. I suppose my error in worded was by using "inaccurate", since that does seem to imply that you would be aiming and firing at something beyond your gun's effective range.
    .
    As I ended with last time, I'm sure in reality (at those speeds, and altitudes, other variables), what I'm thinking might've been a concern, likely isn't.
    In other words: Internal dialogue that I externalized, and probably didn't need to! LOL

    3.4 years ago
  • Profile image

    @Formula350 Beyond 750 feet, the target is going to look tiny and the bullets will take a long time to get there, you will almost certainly miss and waste ammo. The most successful pilots would close until it was impossible to miss and only then would they start shooting.

    3.4 years ago
  • Profile image
    4,302 Formula350

    @F104Deathtrap Yea I knew about the X aiming you're referring to. But that configuration wouldn't complicate the gyro-assisted crosshair?
    .
    It's also rather interesting, to my ignorant mind (although I love WWII period, it's not an obsession; I have factoids but not necessarily 'knowledge'), that they would go for that convergence system instead of firing straight ahead. Or at least, to have them converge at such a close distance (relatively, at 750ft), when the tradeoff is having your rounds beyond that distance be insanely inaccurate. To the point that it makes me wonder how many stray rounds may have dinged friendlies that weren't in technically in LoS/LoF but ended up being due to the inward-aimed gun making bullets at extreme range straying far wider. Alas, I'm sure it didn't, at all, work out as I'm thinking... which is a good thing lol

    3.4 years ago
  • Profile image

    @Formula350 Wing mounted guns were aimed on the ground using a method known as "convergeance." the ground crew would set the guns so that they all aimed at the same spot some 750ft in front of the plane. The bullets traveled in an X shaped pattern where the the center of the X was where they all would hit the same spot. Obviously, if the target was closer, the bullts would hit in a wider pattern, but that wasn't so bad since the widest they'd be is the width of the plane anyway.

    3.4 years ago
  • Profile image
    4,302 Formula350

    In case any other new players read that, figure since this is a "help" thread in a sense, I could at least explain the code from below...
    First one's breakdown:
    Activate3? Throttle : Throttle - 0.33
    1) Activate3 is in itself a 'question' asked to the game and will return either True or False (behind the scenes), which asks whether "Activation Group 3" (aka AG3) is enabled.
    2) The ? now is what starts to turn this into a bit of 'code', as it forms the beginning of an IF statement, which is formatted as x? y : z. This is probably a poor way to look at it BUT, I like to think of it as IF? THEN : ELSE. Because if "X" = True, then it will Input "Y", elsewise (otherwise) it will Input "Y".
    3) Throttle is a placeholder that automagically gets substituted with whatever % of Throttle you have applied, but as a decimal. For example: 0% Throttle (engine off) = 0.00, 58% is 0.58, and 100% is 1.00
    4) Throttle - 0.33 is a bit of simple math which will apply whatever value Throttle you've set, subtracts 0.33 from it. and inputs that value instead.
    .
    That all 'translates' to meaning...
    Is *Action Group 3* enabled?
    If it IS, then use *Whatever Amount of Throttle You Have Applied*.
    Or else if it is NOT, then instead use "Whatever Amount of Throttle You Have Applied -MINUS- 0.33*.

    .
    Real world scenario:
    Since I am using that code for my Engine's "Input" field...
    When AG3 is Disabled, if I apply Full Throttle (100%), it secretly is only really using 66% Throttle.
    When AG3 is Enabled, if I apply Full Throttle, it really IS applying 100%.
    In other words, I'm using this as cheap "throttle stop" to prevent going faster.
    ALTERNATIVELY, you could give your engine EXCESS power, say a Jet Engine with a power value of 2 (instead of 1), and if you used Throttle / 2 in place of Throttle - 0.33, when you activate AG3 it's like applying an Afterburner, :P (Note: If you're smarter than me, you could even code it further so that it needs the AG enabled and Throttle to be 100% before it will engage the "afterburner".)


    Quicker summary of the second:
    Activate3? 0 : 1
    That's used on a Beacon light.
    Translates to: IF AG3 is enabled, THEN turn Beacon OFF (0 = off/disable/false/no), OTHERWISE turn Beacon ON (1 = on/enable/true/yes)
    .
    [Code obtained from a plane of Astro12's. Everything else was learned from reading Snowflake's handy guide for all this stuff.]

    3.4 years ago
  • Profile image
    4,302 Formula350

    @F104Deathtrap Yep closest I've come is adding a gun sight to my aforementioned plane's turret. That took me far less time to sight-in than I thought it would. 2 tries to get the crosshairs to show up on that camera's view, then 4 more to zero it in :D
    .
    Otherwise I've indeed not considered that one, though it does sound nice.
    Though to be honest, I was under the impression that's what the A-to-A dynamic crosshair affixed to each target basically was; a "Shoot Here to Sufficiently Lead The Target" sort of smart-reticle . However, I have also found that it's noooot exactly where one should aim, either. (In hindsight, that could be due to what my original post was about,... lol)


    I imagine that would be ideal for fuselage mounted (centerline) guns, and not ones well into the wings since that'd require twice the gyros and even MORE math that I already wouldn't be able to calculate! lol
    .
    Hell, today's my first attempt at even doing any sort of "real cockpit" sort of stuff, which amazingly has worked as I wanted it to right from the start (well... after I removed the attachments that mysteriously were created between my 'gauge needle' and the dial's face, preventing the needle from moving... lol). In fairness, though, I didn't do anything complex, and on top of it, yoinked that Input code someone else already made -- simple in its own right anyhow, but was beyond my capability.
    Activate3? Throttle : Throttle - 0.33
    Which I was already using a form of it on my engines (albeit set to only subtract 0.175, so that my plane wouldn't exceed a challenge's max speed. Added it to AG3 so that I could still provide its full power and deem it as "WEP" :D So the 'gauge' I made is just a faux "Engine Temp" gauge, which once ""WEP"" is activated, it sweeps into a red zone. It also has a courtesy blinking Red light to indicate that "WEP" is enabled, and a Green (maybe Blue) to signify normal operation. (Provided I can figure out how to set it up so that when AG3 is on, the "Green" indicator turns off, and when AG3 is off, it turns "Green" back on... Tis gonna need more research, as my trial-and-error attempt hasn't bore fruit yet lol)
    EDIT: Well that was easier/quicker than I anticipated...
    I had the right idea, just the wrong input. That Activate# I figured could perhaps also function as the 'toggle', depending on how it was utilized. Alas, it's only use to read, and based stuff on. So for that Green beacon alls I needed to do was change my kludged attempt of Activate3? Activate9 : Deactivate9 (feel free to laugh, it's appropriate lol), to simply be Activate3? 0 : 1 and presto!
    When "WEP" is engaged (AG3), Green turns off, and when disengaged it turns back on ^_^

    3.4 years ago
  • Profile image

    @Formula350 I was referring to WW2 era holographic gunsights that could compensate for the turning of the airplane. Normally, when turning hard (which is the same as pulling up) and firing the guns, the bullets seem to "fall" because by the time they reach the distance of the target, the target has moved and your planes nose is pointing in a new direction.

    What the special gunsight would do is it would estimate for you how far ahead of the target you needed to aim based on the distance (which the pilot would enter using an adjustable knob) and on how hard the plane was turning (which the gunsight automatically figured out because it had a built in gyroscope).

    The result was that when you turned the plane, the crosshairs would move around, accurately showing you where the bullets were going to go when they got to the target.

    TLDR: smart gunsight show where bullets go make aim really easy for pilot

    +1 3.4 years ago
  • Profile image
    4,302 Formula350

    @F104Deathtrap Coincidentally, I'm trying to make a plane turret that has its own gyro for rotation and it... could be better LOL It's just an inertia pendulum while flying, spinning around as it pleases since its input isn't active by default (though, TIL as well, that a Gyro's Control Inputs being inactive does not mean that the Gyro is disabled! heh Thankfully on that plane, the minimal effect it's transferring to the plane is actually helpful given how gentle it is.)
    .
    I'm not sure if the oddity I ALSO experienced, happens to be what you're referring to though... I suspect it isn't, but..
    My plane has cannons as well, and so it has its own dedicated pip sight as we know. One of the cannons is facing aft, and occasionally the pip sight will drift around the screen, seemingly towards a target or to indicate... something, I dunno. My gut was telling me it was only doing that because I was traveling in a direction other than the direction that weapon system points. As it seemed like this also happened after spawning in w/o engaging engines, and the recoil from testing the front-facing cannons gave me some reverse momentum, at which time their piper started drifting.
    (Admittedly, that could've been due to the rear cannons that happen to be in that firing sequence, but are basically just 'dummy' guns that I'm using for a totally different reason mwahaha)


    But yes... SP / Unity Engine quirks are a hoot to deal with/discover! :( lol

    3.4 years ago
  • Profile image

    Just wait until you learn about gyroscopic gunsights!

    3.4 years ago