2021-12-16 05:15:23 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-08-05 16:51:38 +00:00
<class name= "NavigationObstacle2D" inherits= "Node" version= "3.6" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2021-12-16 05:15:23 +00:00
<brief_description >
2D obstacle used in navigation for collision avoidance.
</brief_description>
<description >
2022-01-08 14:39:00 +00:00
2D obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationObstacle2D] is physics safe.
2022-06-01 23:24:43 +00:00
[b]Note:[/b] Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently.
2021-12-16 05:15:23 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "get_navigation" qualifiers= "const" >
<return type= "Node" />
<description >
Returns the [Navigation2D] node that the obstacle is using for its navigation system.
</description>
</method>
2022-05-14 21:33:09 +00:00
<method name= "get_rid" qualifiers= "const" >
<return type= "RID" />
<description >
Returns the [RID] of this obstacle on the [Navigation2DServer].
</description>
</method>
2021-12-16 05:15:23 +00:00
<method name= "set_navigation" >
<return type= "void" />
<argument index= "0" name= "navigation" type= "Node" />
<description >
Sets the [Navigation2D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation2D] node.
</description>
</method>
</methods>
<members >
<member name= "estimate_radius" type= "bool" setter= "set_estimate_radius" getter= "is_radius_estimated" default= "true" >
Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius.
</member>
<member name= "radius" type= "float" setter= "set_radius" getter= "get_radius" default= "1.0" >
The radius of the agent. Used only if [member estimate_radius] is set to [code]false[/code].
</member>
</members>
<constants >
</constants>
</class>