I’m trying to Visualize the SweepMultiByObjectType trace which i have used for raycasting, i want to see the trace visually on screen. Now here is the code i’m using for the tracing part.
FCollisionQueryParams CollisionQueryParams;
FCollisionObjectQueryParams ObjectQueryParams;
FCollisionShape CollisionShape;
TArray<FHitResult> HitResults;
CollisionQueryParams.AddIgnoredActor(Player);
CollisionQueryParams.bTraceComplex = true;
ObjectQueryParams.AddObjectTypesToQuery(ECollisionChannel::ECC_WorldDynamic);
CollisionShape.MakeCapsule(30.f, 90.f);
//StartLocation is camera view point here.
bool bSucceed = GetWorld()->SweepMultiByObjectType(HitResults, DesiredArmLocation, Player->GetActorLocation(), FQuat::Identity, ObjectQueryParams,
CollisionShape, CollisionQueryParams);
now how can i draw the capsule shape that i have used in this trace?
it seems problematic to draw the capsule i have used in the trace. how can i accurately draw my trace on screen?