public void Update() { if (HighLogic.LoadedScene == GameScenes.FLIGHT && active) { if (!vessel.IsControllable || !vessel.Autopilot.Enabled) { return; } if (vessel.targetObject != null) { target = vessel.targetObject; } vessel.Autopilot.SAS.lockedMode = false; vessel.Autopilot.SAS.SetTargetOrientation(target.getAttitude(targetMode), false); } }