// MOVEMENT EXECUTION public override void UpdateMovementExecution() { float progressDelta = AnimationSpeed * Time.deltaTime; progressDelta = Mathf.Clamp(progressDelta, 0, Mathf.Abs(ProgressTarget - ProgressCurrent)); ProgressCurrent += progressDelta; if (!movementFinisherLaunched) { float turningDirection = (Direction == ManeuverDirection.Right) ? 1 : -1; int progressDirection = 1; TheShip.RotateAround(TheShip.TransformPoint(new Vector3(turningAroundDistance * turningDirection, 0, 0)), turningDirection * progressDelta * progressDirection); if (ProgressTarget != 0) { TheShip.RotateModelDuringTurn((ProgressCurrent / ProgressTarget) * (1 - 0.2f * finisherTargetSuccess)); } UpdateRotation(); } else { Vector3 progressDirection = Vector3.forward; TheShip.SetPosition(Vector3.MoveTowards(TheShip.GetPosition(), TheShip.GetPosition() + TheShip.TransformDirection(progressDirection), progressDelta)); if (finisherTargetSuccess != 0) { TheShip.RotateModelDuringTurn((1 - 0.2f * finisherTargetSuccess) + (ProgressCurrent / ProgressTarget) * 0.2f); } UpdateRotationFinisher(); } base.UpdateMovementExecution(); }