Emulating an IR distancing sensor


I am new to using the Unreal Engine and am just starting to get my feet wet. I am currently working on a project in which I would like to create a distancing sensor to tell when an object moves in range. The functionality doesn’t need to complex - I just want to take the reading from the sensor and make it accessible externally (via a Python API or something similar). In my research so far I’ve come across the CARLAsimulator which uses a sensor suite in a similar way to what I’m envisioning, but I’m looking for a much simpler implementation (not for autonomous cars).

Any help in terms of pointing me in the right direction are appreciated! I have some thoughts on how to approach this with ray tracing and Unreal’s Blueprint system, but I wanted to make sure I was approaching this in the best way.

Happy to provide more information as necessary! Sorry if this content creation wasn’t the right place to post this - I can definitely move this to another thread. Thank you!