void OnCollisionEnter(Collision collision)
 {
     if (FSM.CurrentState == FStatesWander.MovingToPosition &&
         !CollisionWhiteListTags.Contains(collision.transform.tag))
     {
         BotLocomotiveComponent.FocusOnPosition(collision.GetContact(0).point);
         BotLocomotiveComponent.MoveAwayFromPosition(false);
     }
 }
        public void MoveToClosestEdge(bool fullspeed = true)
        {
            NavMeshHit hit;

            NavMeshAgentComponent.FindClosestEdge(out hit);
            BotLocomotiveComponent.UnFocus();
            BotLocomotiveComponent.FocusOnPosition(hit.position);
            MoveTowardsPosition(fullspeed);
            // BotLocomotiveComponent.MoveToPosition(BotLocomotive.StopMovementConditions.WITHIN_PERSONAL_SPACE, fullspeed);
            BotLocomotiveComponent.MoveToPosition(Bot.DistanceType.PERSONAL_SPACE, fullspeed);
        }
        public Vector3?JumpOffLedge(bool fullspeed = false)
        {
            RaycastHit rayhit;

            if (CanJumpDown(out rayhit))
            {
                BotLocomotiveComponent.UnFocus();
                BotLocomotiveComponent.FocusOnPosition(rayhit.point);
                // BotLocomotiveComponent.MoveToPosition(BotLocomotive.StopMovementConditions.AT_POSITION, fullspeed);
                BotLocomotiveComponent.MoveToPosition(Bot.DistanceType.AT_POSITION, fullspeed);
                return(rayhit.point);
            }
            return(null);
        }
        void FindNewPosition_Update()
        {
            _findPositionTimeout -= Time.deltaTime;
            if (_findPositionTimeout > 0)
            {
                return;
            }

            _newWanderPosition = _currentBotWanderComponent.GetNewWanderPosition(WanderCenter);

            if (_newWanderPosition != null)
            {
                BotLocomotiveComponent.FocusOnPosition(_newWanderPosition.Value);
                FSM.ChangeState(FStatesWander.MovingToPosition);
            }
            else
            {
                LogInDebugMode("_newWanderPosition != null");
                _wanderAutoRetry = false;
                FSM.ChangeState(FStatesWander.CannotWander);
            }
        }