It looks like the line's lifetime is forced to the default line lifetime of one second if the provided lifetime is less than zero, which would be the case if calling the function with just enough parameters to pass in true for bPersistentLines.

This appears to be a regression as the issue does not occur in 4.19 (CL 4033788), but does occur in both 4.20 (CL 4369336) and 4.21 (CL 4489857).

Steps to Reproduce
  1. Open an existing C++ project or create a new one
  2. In the Tick method for an existing or created Actor, add a call to DrawDebugLine by passing in true for bPersistentLines and the actor's location for either the start or end point
  3. In PIE, move the actor around

Result: The drawn lines are removed after the default line lifetime (one second).

Expected result: The drawn lines are not removed.

Have Comments or More Details?

Head over to the existingAnswerHub thread and let us know what's up.

Login to Vote

Affects Versions4.204.21
Target Fix4.22
Fix Commit4543321
Main Commit4626501
Release Commit4862694
CreatedNov 1, 2018
ResolvedNov 6, 2018
UpdatedFeb 12, 2019