Firstborn/Assets/PivecLabs/MiniMap/Scripts/FrameRotate.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

34 lines
574 B
C#

namespace PivecLabs.Minimap
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class FrameRotate : MonoBehaviour
{
private Transform target;
public bool rotating;
void Start()
{
target = GameObject.FindGameObjectWithTag("Player").transform;
}
void Update()
{
if (rotating == true)
{
Vector3 frameAngle = new Vector3();
frameAngle.z = target.transform.eulerAngles.y;
this.transform.eulerAngles = frameAngle;
}
}
}
}