when i’m using a blueprint linetrace function, the hit point gets a red (color red by default) dot, when it hits something, how can i do that with c++ ?
i managed to create a linetrace function which runs when i press E Key, everything works fine, it’s just the visual representation of the hit point that is missing.
hope you understood my question, i’ll upload a photo example if needed, thank you in advance !
That’s because the line trace in C++ doesn’t have a built-in debugging.
The blueprint line trace is the Kismet System Library function that has additional functionality in it.
Anywhay, if you #include "DrawDebugHelpers.h"
, you’ll be able to manually draw the debug shapes wherever you want, including using the data from you HitResult.
i am using the #include "DrawDebugHelpers.h"
.
i still don’t see the dot on the hit, maybe something in my code ?
It won’t do it automatically, you have to call specific functions yourself. Like
DrawDebudPoint(…) with your OutHit.Location as position, etc…
1 Like
i actually figured it out by searching the documentation on draw debug helpers,
though you guys helped me a lot, so thank you very much !