Use Callable for Navigation Agent callbacks
This commit is contained in:
parent
a43db5afa4
commit
22f9ef19e1
12 changed files with 44 additions and 126 deletions
|
|
@ -41,12 +41,10 @@
|
|||
<method name="agent_set_callback">
|
||||
<return type="void" />
|
||||
<param index="0" name="agent" type="RID" />
|
||||
<param index="1" name="object_id" type="int" />
|
||||
<param index="2" name="method" type="StringName" />
|
||||
<param index="3" name="userdata" type="Variant" default="null" />
|
||||
<param index="1" name="callback" type="Callable" />
|
||||
<description>
|
||||
Sets the callback [param object_id] and [param method] that gets called after each avoidance processing step for the [param agent]. The calculated [code]safe_velocity[/code] will be dispatched with a signal to the object just before the physics calculations.
|
||||
[b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]0[/code] ObjectID as the [param object_id].
|
||||
Sets the callback that gets called after each avoidance processing step for the [param agent]. The calculated [code]safe_velocity[/code] will be passed as the first parameter just before the physics calculations.
|
||||
[b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with an empty [Callable].
|
||||
</description>
|
||||
</method>
|
||||
<method name="agent_set_map">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue