GwNavAStar - stingray.GwNavAStar object reference - Stingray Lua API Reference

stingray.GwNavAStar object reference

Description

Provides access to the main PathFinding Query of Navigation.

Enumerations

AStar Try CanGo Mode

Functions

Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

database_or_world :

any(stingray.GwNavWorld, stingray.GwNavDatabase)

The GwNavDatabase to run the AStar onto. If a GwNavWorld, the default GwNavDatabase will be used.

The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns

stingray.GwNavAStar

The created GwNavAStar.

Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

start :

stingray.Vector3

The position to start from.

dest :

stingray.Vector3

The position to path to.

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

boolean

true if processing has finished and it is then safe to read result from the AStar query, false otherwise.

Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

stingray.Vector3?

If the specified index is valid, returns the position of the node at that index. Otherwise returns nil.

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

number

The number of nodes of the path (0 if no path was found).

Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

number

The cost of the path (0 if no path was found).

Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

number

The distance of the path (0 if no path was found).

Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

boolean

true if a path was found, false otherwise.

Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

turn_sampling_angle :

number

Turns greater than this value will be split into equal fans. In degrees.

channel_smoothing_angle :

number

The maximal angle of the Channel, taken with path edge direction as reference, when entering or quiting open space. Range: [1, 89].

min_distance_between_gates :

number

This distance defines minimum distance between two consecutive gates that are added during the widening between two "turn gates".

max_distance_between_gates :

number

This distance defines maximum distance between two consecutive gates that are added during the widening between two "turn gates".

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

channel_radius :

number

The distance between the path and the Channel borders. In meters..

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

channel_radius :

number

The distance between the path and the Channel borders. In meters..

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

from_outside_navmesh_distance :

number

The maximum distance from the start along the X axis and along the Y axis that will be searched for NavMesh, if the start point is outside the NavMesh. The search looks for triangles in an axis-aligned bounding box around the start point, with a half extent on the x and y axes equal to from_outside_navmesh_distance. To disable this feature, you can set this value to 0

to_outside_navmesh_distance :

number

The maximum distance from the destination along the X axis and along the Y axis that will be searched for NavMesh, if the destination point is outside the NavMesh. The search looks for triangles in an axis-aligned bounding box around the destination point, with a half extent on the x and y axes equal to to_outside_navmesh_distance. To disable this feature, you can set this value to 0

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

extent :

number

The distance between the propagation oriented 2d box boundaries and the [start, dest] segment. The astar propagation does not go outside the box.

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavAStar

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

logic_data :

stingray.GwNavTraverseLogicData

The GwNavTraverseLogicData to use for this astar.

Returns
This function does not return any values.