Added Node camera transitions
Fixed Conveyor speedup issue
This commit is contained in:
21
Assets/Scripts/Network/NetworkCamera.cs
Normal file
21
Assets/Scripts/Network/NetworkCamera.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user