mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Use Callable for Navigation Agent callbacks
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user