Heroes_of_Hiis/Assets/Project Files/Scripts/Arlo/PlatformRotator.cs

21 lines
451 B
C#
Raw Normal View History

2022-03-12 23:50:13 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlatformRotator : MonoBehaviour
{
private GameObject camera;
// Start is called before the first frame update
void Start()
{
camera = GameObject.Find("Main Camera");
}
// Update is called once per frame
void Update()
{
transform.rotation = Quaternion.Euler(0, camera.transform.eulerAngles.y+90, 90);
}
}