Unity3d相机的旋转

作者: 潇千忘 | 来源:发表于2019-04-14 10:14 被阅读2次

    using System.Collections;

    using System.Collections.Generic;

    using UnityEngine;

    public class CameraRotate : MonoBehaviour {

        public Transform pos; //围绕旋转的坐标点

    // Update is called once per frame

    void Update () {

            transform.RotateAround(pos.position,pos.up,Time.deltaTime*5);

    }

    }

    相关文章

      网友评论

        本文标题:Unity3d相机的旋转

        本文链接:https://www.haomeiwen.com/subject/qbdjwqtx.html