로딩
티스토리 데이터 처리 중입니다.

[유니티C#][기초] 2. 특정 오브젝트를 카메라가 따라오가게 하기

 [유니티C#][기초] 2. 특정 오브젝트를 카메라가 따라오가게 하기

123456789101112131415161718192021222324252627using System.Collections;using System.Collections.Generic;using UnityEngine; public class CameraFollow : MonoBehaviour{ public Transform target; public float speed = 5f; private Vector3 offset; public void Awake() { //결국은 화살표가 나를 가르키겠끔 하도록 Player -> 카메라 의 방향을 구해 offset = transform.position - target.position; } public void Update() { //최종위치가 정해지겠지 var .....