u3d物体跟随摄像头旋转角度

来源:互联网 发布:mac上有什么好玩的网游 编辑:程序博客网 时间:2024/06/08 16:24

这里写图片描述
这里写图片描述

    void Update () {        Quaternion rotation = Quaternion.LookRotation(transform.forward - m_arCam.transform.forward);        transform.rotation = Quaternion.Lerp(transform.rotation, rotation, Time.deltaTime * 5.0f);    }