IEnumerator ChangePos()
        {
            m_CharacterController         = m_FPSController.GetComponent <CharacterController>();
            m_CharacterController.enabled = false;

            if (!m_IsResettingPosition)
            {
                // When joystick is hidden, first touch and drag is not working. So this code is needed.
                foreach (var image in m_JoystickImages)
                {
                    image.enabled = false;
                }

                m_LeftJoystick.SetActive(true);
            }

            m_CharacterController.transform.position = m_Destination + m_Offset;
            SetCameraRotation(Quaternion.Euler(m_RotationOffset));
            yield return(null);

            m_CharacterController.enabled = true;

            m_InputActionAsset["Place Joystick Action"].Enable();
            m_WalkModeTeleportController.TeleportFinish();
            m_RotationOffset      = Vector3.zero;
            m_IsResettingPosition = false;

            yield return(new WaitForEndOfFrame());

            Dispatcher.Dispatch(SetWalkStateAction.From(SetInstructionUIStateAction.InstructionUIState.Completed));
        }
        void BeginDragRotation()
        {
            Dispatcher.Dispatch(SetWalkStateAction.From(SetInstructionUIStateAction.InstructionUIState.Started));
            if (!m_IsInit)
            {
                return;
            }

            m_WalkModeTeleportController.SetTeleportDestination(Pointer.current.position.ReadValue());
            m_WalkModeTeleportController.IsTargetPositionValid(result =>
            {
                if (!result)
                {
                    return;
                }

                if (m_WalkModeEnableSelector.GetValue() && m_IsPlacementMode)
                {
                    m_RotateTarget = true;
                    m_WalkModeTeleportController.EnableTarget(true);
                    m_IsPlacementMode = false;
                    m_InputActionAsset["Camera Control Action"].Enable();
                    m_InputActionAsset["Orbit Action"].Disable();
                }
            });
        }
        public void OnQuitWalkMode()
        {
            m_LeftJoystick.SetActive(false);
            m_FirstPersonController.SetJoystickTouch(null);

            m_IsPlacementMode = false;
            ActivateFlyMode(!m_IsInit);
            m_IsActivated = false;

            if (m_StatusDialogCloseCoroutine != null)
            {
                StopCoroutine(m_StatusDialogCloseCoroutine);
                m_StatusDialogCloseCoroutine = null;
            }
            Dispatcher.Dispatch(SetWalkStateAction.From(SetInstructionUIStateAction.InstructionUIState.Init));
        }