Profile image

Structural wings will cease function after any part is destroyed; a bug?

224 Akashenik  5 months ago

As you know, there are two main types of wings in SP. The "normal" wing, and the structural wing. XML "Wing-1/Wing-3/Wing-5", and "Wing-2/Wing-4" respectively.

The main difference between the two is that the structural wing will remain rigid, while the normal wing will bend at its joints in reaction to applied forces. This joint bending can be quite extreme, especially for multi-segmented wings. Thus many people will use the structural wing to avoid their wings acting like wet noodles. (The structural wing is also slightly heavier, but that is not that important, since it's just a difference in value.)

Now to the difference I just discovered:

When a wing part is damaged, and partResponse is "Default", the control surfaces may jam as per the 1.7 update. However, it does not lose lift. And most importantly, this only occurs if the wing part itself is damaged. The wing control surfaces can't jam because of damage to another part.

That's what happens to a normal wing, as intended. For the structural wing too, the ctrl surfaces may jam due to direct damage, and it also will not lose lift when damaged.

However, there is a circumstance, that when a completely separate part on an aircraft is destroyed - "health" variable is at 0, the structural wing will lose its function as a lift generator, whereas with the same circumstance, a normal wing is not affected by the destruction of a wholly separate part.
A damaged part will not affect the structural wing, but once it is destroyed, it will.

There is another type of "wing", the structural panel, specifically made as a wing without aerodynamic function - "wingPhysics" disabled. This is an XML boolean for all wings, but it is default disabled for the structural panel.

Now, back to the behaviour of the structural wing. After the destruction of any part on a plane, the wingPhysics will cease to function on it, as if it were just a structural panel. But part attributes should not be mutable in world runtime, thus I think it may be possible that this is a bug. As clearly this does not occur to the normal wings, whose behaviour is consistent with expectations.

I have tried many different ways to try to mitigate this behaviour but to no avail. Such as setting all parts' partCollisionResponse to "None", changing part connections, and changing the part type of the part destroyed. (I first found this behaviour with glass parts breaking, they have default 1 health; very fragile) but after testing with all structural type parts, it seems to occur regardless of whether it is glass or not. (How glass parts break is another issue entirely. They will chain shatter based on their connections. It is different from normal fuselages in that aspect)

I have not tried disconnected wings as even if it can avoid the behaviour it would be useless in application. Nor have I tried with more specialised parts, as that would be tedious and not have much application either, as those non-structural parts are typically not damage prone.

I have also not done more extensive testing on different wing configurations. I only did testing on planes with frontal main wings/conventional config. And only planes that had structural wings as the main lift generator, and not the stabilizers. However given that there are already two wings on testing, one left one right, I can extrapolate that it would screw up all structural wings on a craft regardless of the config.

Thus I ask if anyone also has this issue, and if they have solutions to resolve it as well.

  • Log in to leave a comment
  • Profile image
    224 Akashenik

    Ok, upon further testing I think I have a hypothesis as too why this happens.
    _
    For starters, I found that the "normal" wing can also serve as a buffer.
    _
    Now to the actual hypothesis:
    The game has different classes of parts, I can't know the specifics, but one of the classes is what I will call "fuselage-type". This class includes all parts from the "structural" tab, and also any "block-type" parts, like engines, the fuel block, intakes, landing gears, etc. And most importantly, the structural wing is also classified as a "fuselage", whilst the normal wing is not.
    _
    The craft can be divided into fuselage sections, connected through non-fuselage parts. Most crafts, however, will only have one main fuselage section; this is what I'll focus on, but for multi-sectioned crafts, what I'll talk about can be applied to each section individually.
    _
    When a part of a fuselage section is destroyed, the game will have to update the model to reflect the new state the craft is in. This update will not only be to the visual model, but also to the physical/physics model. This update only occurs to the specific fuselage section that had a part destroyed. The physics model update will group any structural wings attached to the affected fuselage section together with the typical "fuselage-type" parts, however, the structural wing can have wing physics, while the other fuselage parts cannot. And I believe the function to update the model, when passing through the structural wing, will not take into account the XML of the structural wing, and instead default the structural wing to have wingPhysicsEnabled as false, thus "breaking" it.
    _
    It will take too much time to explain the evidence in words so use this craft to test for yourselves: https://www.simpleplanes.com/a/2i04Me/testCraft
    _
    Side note:
    The rotator and detacher are technically "block-type" parts too, however, their specific connection - the one connection point that affects its function, will separate fuselage sections. This is probably the same for pylons as well, as they're "detacher-type" parts. And it's also why they can work as buffers.

    Pinned 5 months ago
  • Profile image
    224 Akashenik

    I have found a way to buffer the structural wing. If the part destroyed is segregated from the structural wing via any rotator connection, the wing will not lose its function. However, all rotators also have joint wobble. At low stress loads, rotators' wobble is less than that of wing flex, however at higher loads it's actually way worse. And the main use of using structural wings is to not have extreme wing flex at high loads, so this work around is just replacing one problem with another. I can reduce the rotators' joint wobble by making it have more mass, but more mass is more mass, and at large enough it will throw the CoM off. And even then it will still have noticeable wobble unless I make the mass like something ridiculous like 1000x the original weight. At that point, especially for aircraft, the mass is more of a problem then the wings' function breaking when a part is destroyed.
    _
    Addendum: other "gizmo" parts that rely on connections such as the "shock", and "piston", can also act as buffer, but their wobble at high loads is even worse than that of rotators, and there is no way to reduce it, unlike rotaotrs.
    The "detacher", and pylons also work, but like rotators, they have wobble, worse wobble in fact, and they run into the same problem of having to increase mass to dampen wobble.

    Pinned 5 months ago
  • Profile image

    Btw I’m the same guy as behind that handsome fellow
    V

    5 months ago
  • Profile image
    35.8k Graingy

    Huh
    I was not aware of this

    5 months ago
  • Profile image
    224 Akashenik

    I will tag everyone who have upvoted this post as I have addition information. See pinned comments.
    @Tiper4062
    @Graingy
    @ComradeSandman
    @TheMouse
    @kyomunosekai
    @ReinMcDeer
    @rexzion

    5 months ago