mirror of
https://github.com/RaindropViewer/RaindropViewer.git
synced 2026-07-27 22:11:39 +00:00
24 lines
527 B
C#
24 lines
527 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
// follow the target but maintain my own z-height
|
|
public class FollowMinimapItem : MonoBehaviour
|
|
{
|
|
public Transform target;
|
|
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if (target == null)
|
|
return;
|
|
|
|
this.transform.position = new Vector3(
|
|
target.transform.position.x,
|
|
target.transform.position.y,
|
|
this.transform.position.z);
|
|
}
|
|
}
|