Line trace hit value won't stay true

I’m trying to trace each frame to check if a hit has occurred with the world, changing a variable to “true” until the trace is no longer hitting. The problem is when a hit occurs, the variable changes to “true” for one frame, then stays false while the line is still hitting the world.

This seems like it would be a common issue, but I unfortunately have found no information on this problem…

Any info would be much appreciated.

Can you try setting the Draw Debug type to persistent, and seeing the effect in game?
What type of actor is doing this trace?, is it maybe moving, or the other moving?
From what i can tell the trace is only 50 units up from the trace location(50CM), is this intended?
any chance of a screenshot example of the issue?

You could always use a Print String to check values while you are testing.

Found my problem, ‘Trace Location’ is a sphere component floating below the actor for the end location, +50Z added to get the start of the collision capsule.
All I had to do was swap the Start and End values, moving the sphere into the actor, and subtract -50 from the End location…

I’m not sure why it didn’t work before, but your suggestion helped me think to swap the values, so thanks.