private void _ThrowingManagment() { if (_thrower.IsReady()) { List <TrajectoryData> collectedData = _thrower.CollectTrajecoryData(); if (collectedData.Count > 0) { float throwDistance; var directionToLern = dataProcessor.findOptimalThrowDirection(collectedData, target, LastThrowDirection, out throwDistance); _deviationFactor = (float)Sigmoid.Output((double)throwDistance * 0.5 - 2) * 0.4f; var ppDirToLern = (directionToLern + Vector3.one) * 0.5f; if (!_first) { neuralService.NetAdaptation(_lastThrowPosition, target.GetTargetCords(), ppDirToLern); } } var throwPosition = _thrower.GetThrowPosition(); var calcualtedDirection = neuralService.CalculateThrowDirection(throwPosition, target.GetTargetCords()); var ppDir = calcualtedDirection * 2 - Vector3.one; _thrower.DataGatteringThrow(ppDir, _deviationFactor); LastThrowDirection = ppDir; _lastThrowPosition = throwPosition; _first = false; } }