update package; clean serial code; add fps limit for 3rd person; LightManager Update
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
[RequireComponent(typeof(Camera))]
|
||||
public class CameraSmooth : MonoBehaviour {
|
||||
|
||||
public Transform target;
|
||||
public float smoothSpeed = 0.125f;
|
||||
public Vector3 PositionOffset;
|
||||
public int FPS = 60;
|
||||
private void Start()
|
||||
{
|
||||
QualitySettings.vSyncCount = 0;
|
||||
Application.targetFrameRate = FPS;
|
||||
}
|
||||
void Update ()
|
||||
{
|
||||
transform.position = Vector3.Lerp(transform.position, target.position + PositionOffset, smoothSpeed);
|
||||
transform.rotation = Quaternion.Lerp(transform.rotation, target.rotation, smoothSpeed);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user