4
0
This repository has been archived on 2023-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
TremendousTaxi/game/Assets/Scripts/CameraController.cs
2022-09-25 10:29:51 +02:00

17 lines
397 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraController : MonoBehaviour
{
public Transform target;
public Transform targetCamera;
public float smoothSpeed = 0.1f;
void FixedUpdate() {
transform.position = Vector3.Lerp(transform.position, targetCamera.position, smoothSpeed);
transform.LookAt(target);
}
}