Пример #1
0
    public void Npc_Move(Vector3 vector)
    {
        m_AnimatorManager.RoleMoveCtrl();
        if (m_AnimatorManager.GetRotation())
        {
            //移动;
            Vector3 directionVector = vector - this.transform.position;

            Vector3 forwardVector = this.transform.forward.normalized;

            forwardVector -= new Vector3(0, forwardVector.y, 0);

            this.transform.forward = Vector3.Lerp(forwardVector, directionVector, 0.3f);
        }
    }