сростил проекты

This commit is contained in:
vladislove committed 2026-07-19 19:37:17 +03:00
1 parent a4573f2d12
commit dfd44aa129
684 files changed
+152796 -67

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
using UnityEngine;
using UnityEngine;
public class CameraFollow : MonoBehaviour
{
public Transform target;
private Vector3 _offset;
void Start()
{
if (target != null)
{
_offset = transform.position - target.position;
}
else
{
Debug.LogError("Камера: не назначен объект Target!");
}
}
void LateUpdate()
{
if (target != null)
{
transform.position = target.position + _offset;
}
}
}