DebugDrawLine() not drawing a visible line
Hi forum, I have an issue with what i feel should be very simple. I cannot get DebugDrawLine() to actually draw a line that i can see. I am calling the function below from within a custom blueprint node if that makes a difference.
I found that i didn't have DrawDebugHelpers.h originally which i only found out about in a single question on here. however even with that included i still cannot see a line. I have tried giving the line an alpha value of 1 and still nothing. i am wondering if there is a setting i need to torn on like there is in Unity.
Any help is greatly appreciated. Thanks, ND
Note: I do have another question about LineTraceSingle*() not working which could solve this problem by not having to use this function. I will try and link that question to this one.
asked Oct 17 '16 at 11:12 PM in C++ Programming
A couple things could be going on here.
The last argument (5) is the line's thickness, in world units, so it may be that the line is being drawn but not thick enough for you to see (it may be thinner than a pixel) depending on the scale of your world.
You're also drawing a white line, which may be difficult to see based on the background it's being drawn against, you may want to try a different color.
Finally, you've defined the method within USwingShot, which I assume is an UObject. It may be that your GetWorld() call is returning NULL. You may want to verify GetWorld() is actually returning the proper context:
and if it's not, try passing the method a reference to your world from an actor, or from the level itself.
answered Oct 18 '16 at 01:06 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here