Its actually pretty simple.
You will need a 2 pass shader, pass 1 is overlay(it draws on top of everything), and transparent, it has the color of the scan. Pass 2 is the normal shader of the object. Now you only need to lerp pass1’s transparency based on something(i used a gameobject’s position) and its done I used unity but its generally the same in unreal. youtube video