feat: Stage 1 캐릭터 follow 카메라 추가 작업

This commit is contained in:
aube.lee
2025-02-18 21:49:20 +09:00
parent 3bfaf9b4e8
commit e00c62da19
4 changed files with 255 additions and 34 deletions

View File

@@ -0,0 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;
namespace TON
{
public class CameraFollow : MonoBehaviour
{
private CinemachineVirtualCamera vcam;
void Awake()
{
vcam = GetComponent<CinemachineVirtualCamera>();
if (vcam == null)
{
Debug.LogError("Cinemachine Virtual Camera component is missing!");
}
}
public void SetFollowTarget(Transform target)
{
if (vcam != null)
{
vcam.Follow = target;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 58f4ec2a370c10c44a9a548e6cfd2d74
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: