Esempio n. 1
0
        public void UpdateRotationFinisher()
        {
            if (MovementTemplates.CurrentTemplate.transform.Find("Finisher") != null)
            {
                TheShip.SimplifyRotationHelpers();
                bool isSuccessfull = TryRotateUsingStarter(TheShip.GetModelOrientation());
                //bool isSuccessfull = false;

                if (!isSuccessfull)
                {
                    if (GetPathToProcessFinisherLeft(TheShip.Model) > 0)
                    {
                        float angleToNearestCenterPoint = GetAngleToLastSavedTemplateCenterPoint(TheShip.GetModelOrientation());
                        TheShip.UpdateRotationHelper2Angles(new Vector3(0, angleToNearestCenterPoint * GetDirectionModifier(), 0));
                    }
                }
            }
        }