llGetClosestNavPoint

From Second Life Wiki
Revision as of 11:47, 14 February 2012 by Jeremy Linden (talk | contribs) (Created page with "{{Pathfinding alpha}} {{LSL_Function| func=llGetClosestNavPoint| func_desc=The function accepts a point in region-local space (like all the other pathfinding methods) and returns…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Summary

Function: llGetClosestNavPoint( vector point, list options );

The function accepts a point in region-local space (like all the other pathfinding methods) and returns either an empty list or a list containing a single vector which is the closest point on the navmesh to the point provided.

• vector point A point in region-local space.
• list options No options at this time.

Caveats

  • There is no guarantee that a path exists from your current location to the returned point.
  • The radius of the search is currently clamped to 10m but will eventually be a parameter.
  • Using this function incurs a one frame script sleep.

Examples

Notes

Using the method incurs a one frame script sleep and the call can be extremely expensive. It is intended to be used in response to a path_update message indicating an inability to reach a requested destination (e.g., because the character or the destination is off the mesh).

See Also

Events

path_update

Deep Notes

Signature

function void llGetClosestNavPoint( vector point, list options );