Unreal/Manual
Unreal Debug 용 원(Circle) 그리기
Dev_카페인
2024. 1. 11. 01:38
반응형
[Unreal/C++] Debug 용 원(Circle) 그리기
언리얼 엔진 Debug용 DrawDebugCircle()
AiController에서 sight 확인하려고 출력해보았다.
FVector center = OwnerEnemy->GetActorLocation();
center.Z -= AdjustCircleHeight;
// 원을 그릴 방향까지 지정 앞에서 오른쪽으로 시계방향
DrawDebugCircle(GetWorld(), center, Sight->SightRadius, 300, FColor::Green, false, -1, 0, 0, FVector::RightVector, FVector::ForwardVector);
void DrawDebugCircle
(
const UWorld* InWorld, // 월드 (GetWorld())
FVector Center, // 시작 점
float Radius, // 원의 크기
int32 Segments, // 원의 정밀도
const FColor& Color, // 색상
bool bPersistentLines = false, // 지속 여부
float LifeTime = -1.f, // 지속 시간 (-1 시 프레임마다?)
uint8 DepthPriority = 0, // 깊이 우선순위
float Thickness = 0.f, // 두께
FVector YAxis = FVector(0.f, 1.f, 0.f), // 그리기 방향?
FVector ZAxis = FVector(0.f, 0.f, 1.f), // 그리기 방향?
bool bDrawAxis = true // 축 그리기 .. ?
)
반응형