Distance Sensor

Is there a way to make a sensor measure distance?
I have been going through the forums but so far I haven’t seen anyone mention this yet. Ive seen people track items using this Conveyor Tracking Add-on but my goal per so isnt to track the object, just to measure the distance.
Any suggestions or ideas would be greatly appreciate :slight_smile:

Hi @Maffi
You could try using a raycast sensor with range signal.
I attached a small example with a sensor I made for myself. Hope you like it.
Example_Sensor.vcmx (376.0 KB)


This is great! Thank you so much!
I managed to figure out a way myself using “RangedSignal” in the standard Conveyor Sensor and hooking it up to a process executor but your solution is way cleaner!

That’s great! Note that the raycast sensor uses polling, so if you add more than a few to your layout, it can considerably affect the performance. The conveyor sensor could have a better performance as is.

1 Like

That certainly could explain the drop in performance ive been noticing. Is it also possible that process excecutors would affect performance if set to repeat tasks every 0.001 second?

The same rule applies here.
If you have multiple such executors I would reduce the polling frequency or try to modifying the logic to be event-based.

1 Like

Thank you so much for the advice! Ill take it to hearth and make sure i don’t abuse my already weak pc hahahha.