매개변수
- Center: The center location of the sphere in the game world.
- Radius: The radius of the sphere.
- Segments: The number of segments used to approximate the sphere’s surface.
- Color: The color of the sphere.
- PersistentLines: Whether the sphere’s lines should persist between frames.
- LifeTime: The amount of time the sphere should remain visible, in seconds.
- DepthPriority: The priority of the sphere’s depth in the rendering pipeline.
- Thickness: The thickness of the lines used to draw the sphere.
DrawDebugSphere(GetWorld(), GetActorLocation() + FVector(0, 0, 200),
100.f,12, FColor::Red, true,30.f);
GetHitResultUnderCursor
Trace Hit
void ATank::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
if(PlayerControllerRef)
{
FHitResult HitResult;
PlayerControllerRef->GetHitResultUnderCursor(ECC_Visibility, false, HitResult);
DrawDebugSphere(GetWorld(), HitResult.ImpactPoint,
25.f,12, FColor::Red, false,-1.f);
}
}
참고
https://agrawalsuneet.github.io/blogs/drawdebugsphere-in-unreal/
'언리얼' 카테고리의 다른 글
unreal) 특정 거리 안에 들어오면 회전하는 타워 (0) | 2024.11.28 |
---|---|
unreal) FMath::RInterpTo (0) | 2024.11.20 |
unreal) EditDefaultsOnly, EditInstanceOnly, BlueprintReadWrite (0) | 2024.11.11 |
unreal) (AllowPrivateAccess = "true"), Category = "CategoryName" (4) | 2024.11.10 |
unreal) c++ 클래스 삭제 (0) | 2024.11.10 |