Difference between revisions of "LlGetClosestNavPoint"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 7: Line 7:
return_type=list|
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.|
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|

Revision as of 21:25, 6 June 2012

Summary

Function: list llGetClosestNavPoint( vector point, list options );

Used to get a point on the navmesh that is the closest point to point.
Returns a list containing a single vector which is the closest point on the navmesh to the point provided or an empty list.

• vector point A point in region-local space.
• list options GCNP_* and other flags with their parameters. See options table

If an option is not explicitly set, the default value for that option is used.

Options V Parameters Default Description
GCNP_RADIUS ] 0 float distance ] 20.0 ] Limits how far out to search for a navigation point.
GCNP_STATIC ] 1 integer use_static_mesh ] FALSE ] Specifies whether the test should use the static or dynamic nav mesh. In the static case, all dynamic obstacles are ignored.
CHARACTER_TYPE ] 6 integer type ] CHARACTER_TYPE_NONE ] Filters nav points by eliminating nav mesh faces which are 0% walkable for the specified character type. In the default CHARACTER_TYPE_NONE case, all nav mesh faces are included.

Caveats

  • This function causes the script to sleep for 1 frame.
  • There is no guarantee that a path exists from your current location to the returned point.
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 list llGetClosestNavPoint( vector point, list options );