본문 바로가기
Unreal/Manual

Unreal C++ Draw Debug : 오브젝트 그리기

by Dev_카페인 2023. 11. 2.
반응형

[Unreal/C++] Draw Debug : 오브젝트 그리기

Box, Sphere, Point, Circle, Line, Arrow를 그려본다.

 

DrawDebugSolidBox(GetWorld(), Location[0] + Box.GetCenter(), Box.GetExtent(), FColor::Red);

Solid Box : 월드, 중심 위치, 넓이, 색상을 추가한다.

DrawDebugSphere(GetWorld(), Location[2], 100, 20, FColor::Blue);

Sphere  : 월드, 중심 위치, 반지름, 분할정도, 색상을 추가한다.

DrawDebugPoint(GetWorld(), Location[1], 100, FColor::Red);

Point : 월드, 중심 위치, 크기, 색상을 추가한다.

DrawDebugCircle(GetWorld(), Location[3], 100, 20, FColor::Green);

Circle : 월드, 중심 위치, 반지름, 분할정도, 색상을 추가한다.

DrawDebugLine(GetWorld(), Location[2], Location[3], FColor::Magenta, false, -1, 0, 2);

Line : 월드, 위치 A, 위치B, 색상, 지속 여부, 지속 시간, 깊이 우선순위, 굵기를 추가한다.

DrawDebugDirectionalArrow(GetWorld(), location, Location[3], 360, FColor::Yellow, false, -1, 0, 10);

Arrow : 월드, 위치 A, 위치B, 화살표크기, 색상, 지속 여부, 지속 시간, 깊이 우선순위, 굵기를 추가한다.

반응형