shadowmage45 / SSTULabs

Dev repository for testing/unfinished KSP parts/plugins/etc.
Other
62 stars 41 forks source link

In-flight gimbaling does not work for SRBs in latest release #565

Closed MikeOnTea closed 6 years ago

MikeOnTea commented 6 years ago

Worked fine before, now does not work for either lower or upper stage SRBs.

blowfishpro commented 6 years ago

I saw gimbal working for the upper stage SRBs (at least for those nozzles that gimbal). I saw gimbal not working for the new 4 nozzle lower stage one, but I didn't check the rest

MikeOnTea commented 6 years ago

The new 4 nozzle lower stage has set the gimbal limit to 0 explicitly. Weird that it works for you, maybe i should try a completely new vessel... Thanks for commenting.

Edit: Doesn't work with a completely new rocket, either.

taterkerman commented 6 years ago

I'll test this later tonight and see if I can replicate it.

shadowmage45 commented 6 years ago

Several of the nozzles have gimballing explicitly disabled; the 4-nozzle lower stage, and the two upper-stage nozzles that have no gimbal actuators are all fixed, and should have no gimbal control in flight.

The rest though, should certainly have gimbal; you should even be able to see the nozzles move, and the actuators do their thing. If this is not working, please confirm, and I will investigate this evening/later this week.

MikeOnTea commented 6 years ago

I have tested several lower stage nozzles other than the 4-nozzle and they don't gimbal for me, not visually and not functionally. Works perfectly with the old sstu version.

blowfishpro commented 6 years ago

@shadowmage45 how come you disabled gimbal on the 4 nozzle lower stage? I think I set up the model so that it could gimbal.

shadowmage45 commented 6 years ago

@blowfishpro The lower-stage 4-nozzle looked 'fixed' to me (no visible actuators/etc). Would be easy enough to adjust the config to allow some minor (1-2') gimballing -- it is setup to use the thrust transform as gimbal, so would actuate the thrust transform directly (no visible nozzle gimballing).

Would require re-rigging and re-export of the model to enable moving nozzles. As I need to re-export the model anyway to fix some tangent consistency issues that are causing visible seams (mirror modifier = bad for Unity auto-calc'd tangents), I could add in explicit gimbal transforms if desired.

blowfishpro commented 6 years ago

I mostly didn't include the actuators because I figured that no one would ever see them.

shadowmage45 commented 6 years ago

@MikeOnTea Can confirm this issue in testing on the release version. Not sure what/where things went wrong, gimbals were certainly working last I tested them in flight (which was as/after I got the RCS stuff working).

Will step backwards through the commits to find the last working version, run a diff, and find out what all code/config changes were done that could have caused problems.

@blowfishpro I'll add in some gimbal transforms to that model when I re-export it next; already need to do so in order to capture some minor UV changes and fix the tangent seams. Won't hurt to have the transforms there and in place, even if not used (though I'll likely add a few degrees of gimbal range to the configs).

shadowmage45 commented 6 years ago

Okay, so after some investigation I have found out what is going on.

As such, in order to fix the problem properly, I will need to re-export all SRB nozzles to include distinct, separate, and unique thrust and gimbal transforms in the proper hierarchy (including the older legacy / lower-stage nozzles that lacked distinct gimbals).

This also would explain why it didn't show up in pre-release testing -- I was concentrating on testing the nozzles that had visible gimbal actuators and/or RCS; which all work properly.

Edit: Hmm... this is making less sense, as the existing models/nozzles do have different transforms for both gimbal and thrust (usually the gimbal is the nozzle mesh). Looking further now, but I have an idea (part config error).

shadowmage45 commented 6 years ago

Indeed, this particular problem is a config-level error that can easily be corrected.

The following patch file will temporarily fix the problem:

@PART[SSTU-SC-ENG-SRB-A]
{
    @MODULE[SSTUModularBooster]
    {
        %gimbalTransformName = SSTU-MSRM-GimbalTransform
    }
}

However the issue regarding engines using the same transform for both thrust and gimbal still exists, and I will need to adjust at least a couple of the new upper-stage nozzles (the older lower-stage nozzles all use different transforms for gimbal/thrust).

MikeOnTea commented 6 years ago

Thanks, that indeed fixes it. While looking at the upper stage SRBs, i noticed another problem with the fire/exhaust animation though, opened issue #569.