NOTE: Only one proximity module can be used at a time
WARNING: Cannot be used at the same time as the color module
Properties
Name
Data Type
Range
What does the data mean?
100 means an object is within 2in to the sensor while 0 means there is no object within 1ft above it. While the distance module is good for long range, the proximity module is good for close range changes.
What ports can I use it on?
3-6
Code
var howClose =Magic.modules.proximity.amount;
usingMagic;publicclassDemo:MonoBehaviour{ // create a reference to the modulepublicMagic.Modules.ProximityModule proximity;voidStart() { }voidUpdate() { // access the property of the moduleint howClose =proximity.amount; }}