At the basic level, I’m trying to draw a single line from where the mouse started on a click to where it is now.
The only way I’ve been able to get this to work is by doing this:
// start position
FVector StartWorldDirection;
FVector StartPos;
DeprojectScreenPositionToWorld(CursorInfo.StartPosition.X, CursorInfo.StartPosition.Y, StartPos, StartWorldDirection);
DrawDebugLine((), FVector(), StartPos, FColor::Black, false, .1f);
// current pos
FVector EndDirection;
FVector EndPos;
DeprojectMousePositionToWorld(EndPos, EndDirection);
DrawDebugLine((), FVector(), EndPos, FColor::Black, false, .1f);
What I’d like to do is combine the two statements into one like this:
DrawDebugLine((), StartPos, EndPos, FColor::Black, false, .1f);
Unfortunately the more simple call results in incorrect lines, or no lines at all. I’ve tried several combinations of the two methods, only the one shown at the top works. Is this a bug, or am I going about this the wrong way?