Debug Draw Semi Circle?

How can I debug draw a semi circle? I’m working on a heavily physics driven game that requires complete control of the physics engine. So I built a physics abstraction layer and side load 3rd party physics libraries like the Rocket League devs. I’m developing a lot of debug visualization to make sure things are implemented properly. Right now I need to debug draw joint ranges of motion. In the PHAT editor joint limits are illustrated with semi circles. It looks like the debug draw helpers only allow for complete circles to be drawn (and donuts…). Is there an easy way to debug draw a semi circle? I want to be able to specify the degrees/radians corresponding to how big of an arc I want to draw.

I could probably do this by drawing lines and doing math to find the points of the circle to draw but was hoping there was something already implemented.

Sounds like it might be easier with a mesh, widget component or particle system.

Also be aware that the debug stuff doesn’t work in a packaged build.

I think it is possible to get it working, but I don’t think it’s officially supported.

The solution I found doesn’t exist in 4.26 but it is there from 5.0, Might help for anyone in future, I was also looking how to draw an arc, and seeing the documentation led me to the Function void DrawDebugCircleArc ( const UWorld * InWorld, const FVector & Center, float Radius, const FVector & Direction, float AngleWidth, int32 Segments, const FColor & Color, bool PersistentLines, float LifeTime, uint8 DepthPriority, float Thickness )

DrawDebugCircleArc

Funny thing it’s not available as Blueprint Node, we need to write our own wrapper function in a static library and make accessible from there.

1 Like