Multiple gimbals on an engine make MechJeb misbehave
MOARdV opened this issue ยท 0 comments
I've been working with a part in development that currently uses multiple ModuleGimbals to control the craft. Stock KSP seems to manage this configuration okay (SAS behaves as expected), but MJ does not like it. The config log is spammed with
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at System.Collections.Generic.List`1[UnityEngine.Transform].get_Item (Int32 index) [0x00000] in <filename unknown>:0
at MuMech.VesselState.stockGimbalInitialRot (.PartModule p, UnityEngine.Transform engineTransform, Int32 i) [0x00000] in <filename unknown>:0
at (wrapper delegate-invoke) MuMech.VesselState/GimbalExtInitialRot:invoke_Quaternion__this___PartModule_Transform_int (PartModule,UnityEngine.Transform,int)
at MuMech.VesselState+EngineInfo.AddNewEngine (.ModuleEnginesFX e) [0x00000] in <filename unknown>:0
at MuMech.VesselState.AnalyzeParts (.Vessel vessel, MuMech.EngineInfo einfo, MuMech.IntakeInfo iinfo) [0x00000] in <filename unknown>:0
at MuMech.VesselState.Update (.Vessel vessel) [0x00000] in <filename unknown>:0
at MuMech.MechJebCore.FixedUpdate () [0x00000] in <filename unknown>:0
It also seems to behave as if there was only one gimbal providing control (lots of overcompensation and oscillation when trying to hold heading).
I don't know if MJ is going to want to update to support an unusual configuration like this, but I figured I'd put it out there.