Difference between revisions of "LlGetClosestNavPoint"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
{{Pathfinding alpha}}
{{Pathfinding alpha}}
{{LSL_Function|
{{LSL_Function|
inject-2={{LSL_Function/position|point|region=*}}|
inject-2={{LSL Function/position|point|region=*}}|
func=llGetClosestNavPoint|
func=llGetClosestNavPoint|
func_desc=Used to get a point on the navmesh that is the closest point to {{LSLP|point}}.|
func_desc=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.|
func_sleep_frame=1|
return_type=list|
return_text=containing a single vector which is the closest point on the navmesh to the point provided or an empty list.|
func_footer=If an option is not explicitly set, the default value for that option is used.|
p1_type=vector|
p1_type=vector|
p1_name=point|
p1_name=point|
p1_desc=.|
p1_hover=.|
p2_type=list|
p2_type=list|
p2_name=options|
p2_name=options|
p2_desc=GCNP_* and other flags with their parameters. See [[#Options|options]] table|
p2_desc=No options at this time.|
constants={{LSL Constants/llGetClosestNavPoint}}|
caveats=
caveats=
* There is no guarantee that a path exists from your current location to the returned point.|
* 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 20m but will eventually be a parameter.
* Using this function incurs a one frame script sleep.|
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).|
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).|
also_functions=
also_functions=

Revision as of 22:13, 19 June 2012

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 20m but will eventually be a parameter.
  • Using this function incurs a one frame script sleep.
All Issues ~ Search JIRA for related Bugs

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).

Deep Notes

Search JIRA for related Issues

Signature

function void llGetClosestNavPoint( vector point, list options );