Regular API function

simHandleDistance

Description Handles (measures distances, etc.) a registered distance object. Distance objects can be registered while editing a scene. See also simReadDistance, simResetDistance and simCheckDistance.
C synopsis simInt simHandleDistance(simInt distanceObjectHandle,simFloat* smallestDistance)
C parameters
distanceObjectHandle: handle of the distance object or sim_handle_all or sim_handle_all_except_explicit. (sim_handle_all will handle all registered distance objects, while sim_handle_all_except_explicit will only handle those that are not marked as "explicit handling")
smallestDistance: smallest measured distance. Can be NULL
C return value
1 if at least one distance was measured, 0 if no distance was measured, -1 in case of an error
Lua synopsis number result,number smallestDistance=simHandleDistance(number distanceObjectHandle)
Lua parameters
Same as C-function
Lua return values
result: 1 if at least one distance was measured, 0 if no distance was measured, -1 in case of an error
smallestDistance: the smallest distance measured. Is nil if result is not 1

All regular API functions on one page