Attack
개인 프로젝트의 공격 관련 내용입니다.
Ranged Attack
1. LineTrace 를 통해 Hit 확인
struct FHitResult
/** The distance from the TraceStart to the Location in world space. */
float Distance;
/** Name of bone we hit (for skeletal meshes). */
FName BoneName;
/** Handle to the object hit by the trace. */
UPROPERTY()
FActorInstanceHandle HitObjectHandle;
AActor* GetActor() const
{
return HitObjectHandle.FetchActor();
}
Leave a comment