Racing_Game/Assets/Scripts/Map/FollowTarget.cs
2024-06-14 17:04:42 +03:00

16 lines
357 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FollowTarget : MonoBehaviour
{
[SerializeField] private Transform target;
[SerializeField] private Vector3 offset;
// Update is called once per frame
void Update()
{
transform.position = target.transform.position + offset;
}
}