Commands › Objects
touch_prim_coord
Touch the object nearest a point
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "touch_prim_coord",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"x": "130",
"y": "127.5",
"z": "25.3",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
xnumber | yes | X coordinate. |
ynumber | yes | Y coordinate. |
znumber | yes | Z coordinate. |
precisionnumber | no | How close to the point the object must be, in metres. Default: 0.5 |
Example response
{
"result": "OK",
"object": {
"id": 1234567,
"uuid": "9f8e7d6c-5b4a-4321-8fed-000000000000",
"name": "Door",
"distance": "0.12"
}
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- Linked child prims and attachments may be missed. Prefer touch_prim when you know the UUID.