touch_prim_coord

From SmartBots Developers Docs
HTTP APIBot Commands
Revision as of 14:26, 7 September 2017 by Gg (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Touches a prim in-world by using its coordinates.

This command tries to locate the object with specific coordinates, and touches it. The approximate coordinates may be given, with a specified precision.

Variables

The following table shows input values (you send them with the API call) and returned output values.

Variable Required Description
Input basic parameters:
action yes = touch_prim_coord
apikey yes Your personal developer's API key.
botname yes Your bot's SL login.
secret yes Bot access code of your bot.
dataType optional Set to "json" to get JSON reply instead of URL-encoded string
custom optional The custom data (string) to be passed back to caller script. This value will be returned back to the caller in HTTP response.
Input:
x yes the X coordinate (integer or float)
y yes the Y coordinate (integer or float)
z yes the Z coordinate (integer or float)
precision optional the precision. Default 0.5 meters
Output:
(to be received in http_response LSL event, see docs for details)
result OK - command completed successfully
FAIL - command failed
resulttext Detailed reason for the failure.
custom The value from input "custom" parameter. See above.

Comments

This command tries to find a prim somewhere close to the given coordinates. The precision can be set manually.

The default precision 0.5 meters. This means that object closer than 0.5 meters will be touched (only one object will be chosen though).

This command implies the same limitations as touch_prim:

  1. The distance. Bot view range is around 32 meters, so it may not see the object on the other side of the sim.
  2. The load time. Bot loads its surroundings within a minute after teleporting. Thus, give it 1-2 minutes to load all nearby prims. However, after loading, all new nearby prims are being detected immediately.

Examples

Bot tries to touch the prim at <214.5,127,32> with a precision of 1 meter:

action=touch_prim_coord&x=214.5&y=127&z=32&precision=1.0

InstAPI: See this query in API Test Suite: click here



<< return back to Bot commands

(Miss an API call or parameter? Submit your request in forum)