KAS.KASModuleWinch.IsLockable C# (CSharp) Метод

IsLockable() приватный Метод

private IsLockable ( ) : bool
Результат bool
        private bool IsLockable()
        {
            float distance = Vector3.Distance(winchAnchorNode.position, headAnchorNode.position);
            if (distance > lockMinDist) {
              KAS_Shared.DebugLog(
              "CanLock(Winch) - Can't lock, distance is : {0} and lockMinDist set to : {1}",
              distance, lockMinDist);
              return false;
            }
            float fwdDot = Mathf.Abs(Vector3.Dot(winchAnchorNode.forward, headAnchorNode.forward));
            if (fwdDot <= lockMinFwdDot) {
              KAS_Shared.DebugLog(
              "CanLock(Winch) - Can't lock, forward dot is : {0} and lockMinFwdDot set to : {1}",
              fwdDot, lockMinFwdDot);
              return false;
            }
            float rollDot = Vector3.Dot(winchAnchorNode.up, headAnchorNode.up);
            if (rollDot <= float.MinValue) {
              KAS_Shared.DebugLog(
              "CanLock(Winch) - Can't lock, roll dot is : {0} and lockMinRollDot set to : {1}",
              rollDot, float.MinValue);
              return false;
            }
            return true;
        }