Add NavigationServer random point queries
Adds query functions to get random points on navigation mesh to the NavigationServer.
This commit is contained in:
@ -445,6 +445,17 @@
|
||||
Returns the navigation path to reach the destination from the origin. [param navigation_layers] is a bitmask of all region navigation layers that are allowed to be in the path.
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_random_point" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<param index="0" name="map" type="RID" />
|
||||
<param index="1" name="navigation_layers" type="int" />
|
||||
<param index="2" name="uniformly" type="bool" />
|
||||
<description>
|
||||
Returns a random position picked from all map region polygons with matching [param navigation_layers].
|
||||
If [param uniformly] is [code]true[/code], all map regions, polygons, and faces are weighted by their surface area (slower).
|
||||
If [param uniformly] is [code]false[/code], just a random region and a random polygon are picked (faster).
|
||||
</description>
|
||||
</method>
|
||||
<method name="map_get_regions" qualifiers="const">
|
||||
<return type="RID[]" />
|
||||
<param index="0" name="map" type="RID" />
|
||||
@ -681,6 +692,17 @@
|
||||
Returns the [code]ObjectID[/code] of the object which manages this region.
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_random_point" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<param index="0" name="region" type="RID" />
|
||||
<param index="1" name="navigation_layers" type="int" />
|
||||
<param index="2" name="uniformly" type="bool" />
|
||||
<description>
|
||||
Returns a random position picked from all region polygons with matching [param navigation_layers].
|
||||
If [param uniformly] is [code]true[/code], all region polygons and faces are weighted by their surface area (slower).
|
||||
If [param uniformly] is [code]false[/code], just a random polygon and face is picked (faster).
|
||||
</description>
|
||||
</method>
|
||||
<method name="region_get_travel_cost" qualifiers="const">
|
||||
<return type="float" />
|
||||
<param index="0" name="region" type="RID" />
|
||||
|
||||
Reference in New Issue
Block a user