You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
918 B
42 lines
918 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using DG.Tweening;
|
|
|
|
namespace CpuIII
|
|
{
|
|
public class CameraAutoRotation : MonoBehaviour
|
|
{
|
|
public Transform targetTran;
|
|
|
|
public float rotSpeed;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
OpenAnimationProgress();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
|
|
}
|
|
|
|
private void LateUpdate()
|
|
{
|
|
this.transform.LookAt(targetTran);
|
|
}
|
|
|
|
|
|
void OpenAnimationProgress()
|
|
{
|
|
this.transform.DOLookAt(targetTran.position, 3.0f);
|
|
//this.transform.DORotate(new Vector3(57.62f, 180f, 0), 3.0f).SetEase(Ease.Linear);
|
|
this.transform.DOMove(new Vector3(0.06f,4.84f,2.98f),3.0f).SetEase(Ease.Linear);
|
|
}
|
|
}
|
|
}
|
|
|