How do I make an OverlapMulti()'s FCollisionShape visible?
I do not mean detect visible channel, I mean to make the shape itself visible while testing in the editor.
This would be very useful for debugging purposes, is it possible?
How do I make an OverlapMulti()'s FCollisionShape visible?
I do not mean detect visible channel, I mean to make the shape itself visible while testing in the editor.
This would be very useful for debugging purposes, is it possible?
I usually just manually draw the shape with one of the following:
e.g.
// Doing my collision check
const FVector extent(newWidth * 0.5f, newWidth * 0.5f, newHeight * 0.5f);
GetWorld()->OverlapAnyTestByObjectType(newLoc, FQuat::Identity, colObjQueryParams, FCollisionShape::MakeCapsule(extent), colQueryParams)
// Draw a debug shape using the collision params
DrawDebugCapsule(GetWorld(), newLoc, extent.Z, extent.X, FQuat::Identity, FLinearColor::Green, -1.0f)
static FName KickOverlap(TEXT(“KickOverlap”));
FCollisionQueryParams Params(KickOverlap, false, this);
GetWorld()->DebugDrawTraceTag = KickOverlap;
Then use overlap or something, the engine will draw shapes/lines.
Thanks I got it to draw, but how do make it not permanent?
EDIT: Nvm found it. FlushPersistentDebugLines() Thanks again.
Ah nice - I didn’t know about FlushPersistentDebugLines().
Another option is to pass in a value for display time when calling DrawDebugCapsule(). It is the last param in the signature. I think values smaller than or equal to zero is seen as persistent.