Clearance Profil for Train


I’m completely new to Unreal so my knowledge isn’t that big. I already create a train with rails in Unreal and put it on a 3D-Map. Now I need a clearance Profil like in the picture to say that the train should stop if something goes in that Profil and turns the color for example into red.

Is it hard to create something like that in Unreal? I really don’t know how to do it …

Grateful for any help