This video shows to model a sensor that uses raycasting to detect parts during a simulation.
This video is also available from the Visual Components Academy:
https://academy.visualcomponents.com/lessons/model-a-raycast-sensor/
Made with Visual Components 4.0.5