UILookAtCamera
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UILookAtCamera : MonoBehaviour
{
void LateUpdate()
{
transform.LookAt(transform.position + Camera.main.transform.rotation * Vector3.forward, Camera.main.transform.rotation * Vector3.up);
}
}
'Client > Unity' 카테고리의 다른 글
Unity Protobuf 설치 (2) | 2024.09.01 |
---|---|
Unity) Singleton 제네릭 매니저 만들기 (0) | 2024.05.24 |
Unity) Frame Rate 설정 (0) | 2024.05.12 |
Unity) CharacterController에서 transform.position이 작동하지 않을 때 (0) | 2024.05.10 |
Unity) Input system - 이동 (0) | 2024.05.04 |