public Vector3D GetMaxSpeed() { return(new Vector3D( Math.Min(RightThrusters.EffectivePow, LeftThrusters.EffectivePow), Math.Min(UpThrusters.EffectivePow, DownThrusters.EffectivePow), Math.Min(ForwardThrusters.EffectivePow, BackwardThrusters.EffectivePow)) / RemCon.CalculateShipMass().TotalMass); }
//private void SetGroupThrust(List<IMyThrust> ThrList, float Thr) //{ // for (int i = 0; i < ThrList.Count; i++) // ThrList[i].ThrustOverridePercentage = Thr; //} public void SetThrust(Vector3D ThrVec) { this.ForEach(x => x.ThrustOverride = 0); var mas = RemCon.CalculateShipMass().TotalMass; ThrVec.X = ThrVec.X / (ThrVec.X > 0 ? RightThrusters : LeftThrusters).EffectivePow; ThrVec.Y = ThrVec.Y / (ThrVec.Y > 0 ? UpThrusters : DownThrusters).EffectivePow; ThrVec.Z = ThrVec.Z / (ThrVec.Z > 0 ? BackwardThrusters : ForwardThrusters).EffectivePow; SetProcThrust(ThrVec); }