Карта для игрока
This commit is contained in:
15
Assets/Scripts/Map/FollowTarget.cs
Normal file
15
Assets/Scripts/Map/FollowTarget.cs
Normal file
@ -0,0 +1,15 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user