GQ_Communicate/GQ_TongXin/Assets/Scripts/WJ/LookCamera.cs

20 lines
421 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LookCamera : MonoBehaviour
{
public Transform camera_transform;
// Start is called before the first frame update
void Start()
{
camera_transform = Camera.main.transform;
}
// Update is called once per frame
void Update()
{
transform.rotation = camera_transform.rotation;
}
}