Hello,
is there a way how to recognize if object detected by proximity sensor is static or dynamic?
Thanks!
Proximity sensor detection
Re: Proximity sensor detection
Hello,
yes, you can do:
Cheers
yes, you can do:
Code: Select all
local result,distance,detectedPoint,detectedObjectHandle,detectedSurfaceNormalVector=sim.readProximitySensor(sensorHandle)
if detectedObjectHandle then
if sim.getObjectType(detectedObjectHandle)==sim.object_shape_type then
local r,p=sim.getObjectInt32Parameter(detectedObjectHandle,sim.shapeintparam_static)
if p>0 then
print("detected static shape")
else
print("detected dynamic shape")
end
end
end