cupid added

This commit is contained in:
2026-02-15 12:12:55 +05:30
parent b7d8bb1c8c
commit 3108262326
46 changed files with 4152 additions and 260 deletions
@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraFollower : MonoBehaviour
{
[SerializeField]private Vector3 offset;
[SerializeField]private bool autoOffset = false;
[SerializeField]private Transform target;
[SerializeField]private float smoothness = 0.1f;
void LateUpdate()
{
if(target==null){return;}
transform.position = Vector3.Lerp(transform.position, target.position + offset,smoothness);
}
public void SetTarget(Transform _target){
target = _target;
offset = transform.position - target.position;
}
}