21 lines
402 B
C#
21 lines
402 B
C#
using UnityEngine;
|
|
|
|
public class RotateAroundTerrain : MonoBehaviour
|
|
{
|
|
public Transform playercamera;
|
|
|
|
public GameObject Centre;
|
|
|
|
public float rotateSpeed = 3f;
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
playercamera.transform.LookAt(Centre.transform.position);
|
|
playercamera.transform.RotateAround(Centre.transform.position, Vector3.up, rotateSpeed * Time.deltaTime + 1E-07f);
|
|
}
|
|
}
|