2Test/Assets/Script/Follow.cs

16 lines
267 B
C#
Raw Permalink Normal View History

2026-01-22 06:35:21 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Follow : MonoBehaviour
{
public Transform target;
public Vector3 offset;
void Update()
{
transform.position = target.position + offset;
}
}