I am performing a LineTraceSingleByChannel on the world from a stationary actor every tick with the exact same start and end position. I am also moving a boxcollider in and out of its path every second using SetActorLocationAndRotation.
Most of the time it detects the object immediately, but occasionally (like once every 20 seconds or so) it takes a while to detect the object and the linetrace will not detect the moved object for up to 200ms (10-20 ticks) .
I have also tried Overlaps and sweeps with the same outcome. It happens in 4.26 & 4.27 and both in the editor and as a standalone build.
I’m not using physics substeps or any async stuff as far as I know.
Any ideas why this is happening and how to fix it to make the linetrace robust?