MotherShip.CanEnterOrbitalMode C# (CSharp) Method

CanEnterOrbitalMode() public method

public CanEnterOrbitalMode ( ) : bool
return bool
    public bool CanEnterOrbitalMode()
    {
        if (!this.CanEnterOrbitalAutoPilotMode ()) {
            return false;
        }
        if (Mathf.Abs(this.RollFor (this.SelectedPlanet)) > 10f) {
            return false;
        }
        if (Mathf.Abs(this.PitchFor (this.SelectedPlanet)) > 10f) {
            return false;
        }

        float orbitalSpeedClosest = Mathf.Sqrt (this.SelectedPlanet.Grav.mass / this.SelectedPlanetDist);

        if (Mathf.Abs ((this.forwardVelocity - orbitalSpeedClosest) / orbitalSpeedClosest) > 0.1f) {
            return false;
        }
        return true;
    }