Draw debug lines? (c++)

Hello there,

I’m doing some tests and I can’t find a way to draw a debug line, like we used to do with DrawDebugLine() in UE3. all I’ve found is the Blueprint debug line stuff, but I’m working with C++

any ideas?

thanks

Hey Oscar,

I am seeing what debug stuff you have access to and have assigned a programmer to see if they can’t provided a quicker answer. As a rocket user would having access to DrawDebugLine, assuming you don’t already, be fairly useful for you?

Best Regards,

Ryan

yes, it’d be most useful!

anything related to traces, distance check debugging and other misc. stuff (weapon traces, a custom pathfinding implementation, my random dungeon generator) - all of those tasks I did on UDK and I’m planning to do on Rocket, would’ve been much more painful without DrawDebugLine and DrawDebugSphere :slight_smile:

Did you check out DrawDebugHelpers.h? (/Runtime/Engine/Public folder) That should have functions that are similar to what you’re used to!

–Mike

that seems exactly what I need!

however excuse my c++ noobness, so let me ask (and it will probably be useful for someone else), how do I access the DrawDebugHelpers functions from somewhere else?

in case anyone is wanting to do this, I figured it out.
at the header of the class you want to use DrawDebugLine at, you must add the following:

#include "DrawDebugHelpers.h"

add that right before #include “WhateverClass.generated.h” and you’ll be able to directly use DrawDebugLine() from within your class

1 Like

Great alternative to accepted answer here: https://answers.unrealengine.com/questions/28128/draw-debug-lines-for-line-tracing.html

:slight_smile: