Exemple #1
0
    private void FixedUpdate()
    {
        m_animator.SetFloat("VerticalSpeed", m_nav.velocity.normalized.y);
        m_animator.SetFloat("HorizontalSpeed", m_nav.velocity.normalized.x);

        if (m_nav.velocity != Vector2.zero)
        {
            m_animator.SetFloat("LastVerticalSpeed", m_nav.velocity.normalized.y);
            m_animator.SetFloat("LastHorizontalSpeed", m_nav.velocity.normalized.x);
        }


        vision.setAimDirection(lastMoveDir);
        vision.setOrigin(m_nav.transform.position);
    }