Regular API function

simCreateProximitySensor / sim.createProximitySensor

Description Creates a proximity sensor.
int simCreateProximitySensor(int sensorType,int subType,int options,const int* intParams,const double* floatParams,const double* reserved)
sensorType: the desired proximity sensor type (e.g. sim.proximitysensor_cone_subtype)
subType: deprecated. Set to 16
options: bit-coded options:
bit 0 set (1): the sensor will be explicitely handled
bit 1 set (2): reserved. Set to 0
bit 2 set (4): the detection volume is not shown
bit 3 set (8): front faces are not detected
bit 4 set (16): back faces are not detected
bit 5 set (32): fast detection (i.e. not exact detection)
bit 6 set (64): the normal of the detected surface with the detection ray will have to lie below a specified threshold angle
bit 8 set (256): smallest distance threshold will be active
bit 9 set (512): randomized detection (only with ray-type proximity sensors)
intParams (input): 8 integer parameters:
intParams[0]: face count (volume description)
intParams[1]: face count far (volume description)
intParams[2]: subdivisions (volume description)
intParams[3]: subdivisions far (volume description)
intParams[4]: randomized detection, sample count per reading
intParams[5]: randomized detection, individual ray detection count for triggering
intParams[6]: reserved. Set to 0
intParams[7]: reserved. Set to 0
floatParams (input): 15 floating point parameters:
floatParams[0]: offset (volume description)
floatParams[1]: range (volume description)
floatParams[2]: x size (volume description)
floatParams[3]: y size (volume description)
floatParams[4]: x size far (volume description)
floatParams[5]: y size far (volume description)
floatParams[6]: inside gap (volume description)
floatParams[7]: radius (volume description)
floatParams[8]: radius far (volume description)
floatParams[9]: angle (volume description)
floatParams[10]: threshold angle for limited angle detection (see bit 6 above)
floatParams[11]: smallest detection distance (see bit 8 above)
floatParams[12]: sensing point size
floatParams[13]: reserved. Set to 0.0
floatParams[14]: reserved. Set to 0.0
reserved: set to nullptr
return value
-1 if operation was not successful, otherwise the handle of the force sensor
int sensorHandle=sim.createProximitySensor(int sensorType,int subType,int options,int[8] intParams,float[15] floatParams)
Similar to the C-function counterpart
return values
Similar to the C-function counterpart
int sensorHandle=sim.createProximitySensor(int sensorType,int subType,int options,list intParams,list floatParams)