This commit is contained in:
Gerard Gascón 2025-04-24 14:30:07 +02:00
commit 102013b228
1443 changed files with 1065651 additions and 0 deletions

View file

@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FollowPlayer : MonoBehaviour
{
[SerializeField] Transform jugador;
[SerializeField] Vector3 offset;
[SerializeField] float smooth = 0.125f;
// Update is called once per frame
void FixedUpdate()
{
transform.position = Vector3.Lerp(transform.position, jugador.position + offset, smooth);
//transform.position = Vector3.SmoothDamp();
}
}