_xiaofang/xiaofang/Assets/Script/hylScripts/LookAt.cs

20 lines
344 B
C#
Raw Normal View History

2024-12-18 20:42:08 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LookAt : MonoBehaviour
{
public Transform player;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.LookAt(player);
}
}