mirror of
https://github.com/xiaopeng12138/MaiDXR.git
synced 2024-11-28 04:50:48 +01:00
66f4101943
Add json config fuction Update new smooth camera display method Update framework materials
15 lines
383 B
C#
15 lines
383 B
C#
using UnityEngine;
|
|
|
|
public class CameraSmooth : MonoBehaviour {
|
|
|
|
public Transform target;
|
|
public float smoothSpeed = 0.125f;
|
|
public Vector3 PosotionOffset;
|
|
void FixedUpdate ()
|
|
{
|
|
transform.position = Vector3.Lerp(transform.position, target.position + PosotionOffset, smoothSpeed);
|
|
transform.rotation = Quaternion.Lerp(transform.rotation, target.rotation, smoothSpeed);
|
|
}
|
|
|
|
}
|