使当前物体朝向目标物体 修改目标的 forward

    Vector3 dir = m_chooseTarget.transform.position - transform.position;
    dir.y = 0;
    transform.forward = dir.normalized;

你可能感兴趣的:(unity)