unity3D技术分享Unity基础入门分享Unity技术分享

Unity3d相机的旋转

2019-04-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);

}

}

上一篇下一篇

猜你喜欢

热点阅读