예제 #1
0
    private void FixedUpdate()
    {
        float v = playerInput.Vertical;
        float h = playerInput.Horizontal;

        if (m_Cam != null)
        {
            m_CamForward = Vector3.Scale(m_Cam.forward, new Vector3(1, 0, 1)).normalized;
            m_Move       = v * m_Cam.forward + h * m_Cam.right;
        }
        else
        {
            m_Move = v * Vector3.forward + h * Vector3.right;
        }
#if !MOBILE_INPUT
        if (playerInput.LShift)
        {
            m_Move *= 0.5f;
        }
#endif
        m_Character.Move(m_Move, playerInput.Crouch, m_Jump);
        m_Jump = false;
    }