Files
gmtk-2021/Assets/Scripts/Network/NetworkCamera.cs
Jan Groß 759cf0a383 Added Node camera transitions
Fixed Conveyor speedup issue
2021-06-12 15:28:07 +02:00

22 lines
520 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NetworkCamera : MonoBehaviour
{
public Vector3 targetPosition;
public float lerpSpeed = 2;
// Start is called before the first frame update
void Start()
{
targetPosition = transform.position;
}
// Update is called once per frame
void Update()
{
transform.position = Vector3.Lerp(transform.position, targetPosition, Time.deltaTime * lerpSpeed);
}
}