
Unreal - NPC 상호작용
·
Unreal5 프로젝트 다이어리
NPC에 상호작용이 가능하게 할수있는 콜리전을 달아줍니다 사용할 헤더추가#include "Components/SphereComponent.h" 트리거용 스피어컴포넌트와 탐지될 범위를 지정해줍니다UPROPERTY(EditAnywhere)class USphereComponent* detectSphere;UPROPERTY(EditAnywhere, Category="Detect")float detectRadius = 200.0; 플레이어한테 붙혀주고 범위를 설정해줍니다detectSphere = CreateDefaultSubobject(TEXT("detectSphere"));detectSphere->SetupAttachment(RootComponent);detectSphere->SetSphereRadius(det..