mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Update navigation obstacle API
Updates navigation obstacle API.
This commit is contained in:
@@ -464,6 +464,13 @@
|
||||
Creates a new navigation obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_get_avoidance_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<param index="0" name="obstacle" type="RID" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the provided [param obstacle] has avoidance enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_get_map" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<param index="0" name="obstacle" type="RID" />
|
||||
@@ -471,11 +478,20 @@
|
||||
Returns the navigation map [RID] the requested [param obstacle] is currently assigned to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_avoidance_enabled">
|
||||
<return type="void" />
|
||||
<param index="0" name="obstacle" type="RID" />
|
||||
<param index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [param enabled] the provided [param obstacle] affects avoidance using agents.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_avoidance_layers">
|
||||
<return type="void" />
|
||||
<param index="0" name="obstacle" type="RID" />
|
||||
<param index="1" name="layers" type="int" />
|
||||
<description>
|
||||
Set the obstacles's [code]avoidance_layers[/code] bitmask.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_map">
|
||||
@@ -494,6 +510,22 @@
|
||||
Sets the position of the obstacle in world space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_radius">
|
||||
<return type="void" />
|
||||
<param index="0" name="obstacle" type="RID" />
|
||||
<param index="1" name="radius" type="float" />
|
||||
<description>
|
||||
Sets the radius of the dynamic obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_velocity">
|
||||
<return type="void" />
|
||||
<param index="0" name="obstacle" type="RID" />
|
||||
<param index="1" name="velocity" type="Vector2" />
|
||||
<description>
|
||||
Sets [param velocity] of the dynamic [param obstacle]. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="obstacle_set_vertices">
|
||||
<return type="void" />
|
||||
<param index="0" name="obstacle" type="RID" />
|
||||
|
||||
Reference in New Issue
Block a user