16 lines
357 B
C#
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;
|
|
}
|
|
}
|