fix first person camera issue

This commit is contained in:
xpeng
2022-08-01 23:44:03 +02:00
parent 713b5fa7c7
commit dc6e325867
3 changed files with 30 additions and 12 deletions
+1
View File
@@ -13,6 +13,7 @@ public class CameraSmooth : MonoBehaviour {
}
void Update ()
{
if (target == null) return;
transform.position = Vector3.Lerp(transform.position, target.position + PositionOffset, smoothSpeed);
transform.rotation = Quaternion.Lerp(transform.rotation, target.rotation, smoothSpeed);
}