class_animationnodestatemachine.rst 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationNodeStateMachine.xml.
  6. .. _class_AnimationNodeStateMachine:
  7. AnimationNodeStateMachine
  8. =========================
  9. **Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A state machine with multiple :ref:`AnimationRootNode<class_AnimationRootNode>`\ s, used by :ref:`AnimationTree<class_AnimationTree>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Contains multiple :ref:`AnimationRootNode<class_AnimationRootNode>`\ s representing animation states, connected in a graph. State transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the :ref:`AnimationNodeStateMachinePlayback<class_AnimationNodeStateMachinePlayback>` object from the :ref:`AnimationTree<class_AnimationTree>` node to control it programmatically.
  15. .. tabs::
  16. .. code-tab:: gdscript
  17. var state_machine = $AnimationTree.get("parameters/playback")
  18. state_machine.travel("some_state")
  19. .. code-tab:: csharp
  20. var stateMachine = GetNode<AnimationTree>("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback;
  21. stateMachine.Travel("some_state");
  22. .. rst-class:: classref-introduction-group
  23. Tutorials
  24. ---------
  25. - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
  26. .. rst-class:: classref-reftable-group
  27. Properties
  28. ----------
  29. .. table::
  30. :widths: auto
  31. +--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+
  32. | :ref:`bool<class_bool>` | :ref:`allow_transition_to_self<class_AnimationNodeStateMachine_property_allow_transition_to_self>` | ``false`` |
  33. +--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+
  34. | :ref:`bool<class_bool>` | :ref:`reset_ends<class_AnimationNodeStateMachine_property_reset_ends>` | ``false`` |
  35. +--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+
  36. | :ref:`StateMachineType<enum_AnimationNodeStateMachine_StateMachineType>` | :ref:`state_machine_type<class_AnimationNodeStateMachine_property_state_machine_type>` | ``0`` |
  37. +--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+
  38. .. rst-class:: classref-reftable-group
  39. Methods
  40. -------
  41. .. table::
  42. :widths: auto
  43. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`add_node<class_AnimationNodeStateMachine_method_add_node>`\ (\ name\: :ref:`StringName<class_StringName>`, node\: :ref:`AnimationNode<class_AnimationNode>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |
  45. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | |void| | :ref:`add_transition<class_AnimationNodeStateMachine_method_add_transition>`\ (\ from\: :ref:`StringName<class_StringName>`, to\: :ref:`StringName<class_StringName>`, transition\: :ref:`AnimationNodeStateMachineTransition<class_AnimationNodeStateMachineTransition>`\ ) |
  47. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Vector2<class_Vector2>` | :ref:`get_graph_offset<class_AnimationNodeStateMachine_method_get_graph_offset>`\ (\ ) |const| |
  49. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`AnimationNode<class_AnimationNode>` | :ref:`get_node<class_AnimationNodeStateMachine_method_get_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  51. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`StringName<class_StringName>` | :ref:`get_node_name<class_AnimationNodeStateMachine_method_get_node_name>`\ (\ node\: :ref:`AnimationNode<class_AnimationNode>`\ ) |const| |
  53. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Vector2<class_Vector2>` | :ref:`get_node_position<class_AnimationNodeStateMachine_method_get_node_position>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  55. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`AnimationNodeStateMachineTransition<class_AnimationNodeStateMachineTransition>` | :ref:`get_transition<class_AnimationNodeStateMachine_method_get_transition>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  57. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`get_transition_count<class_AnimationNodeStateMachine_method_get_transition_count>`\ (\ ) |const| |
  59. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`StringName<class_StringName>` | :ref:`get_transition_from<class_AnimationNodeStateMachine_method_get_transition_from>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  61. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`StringName<class_StringName>` | :ref:`get_transition_to<class_AnimationNodeStateMachine_method_get_transition_to>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| |
  63. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`bool<class_bool>` | :ref:`has_node<class_AnimationNodeStateMachine_method_has_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  65. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`bool<class_bool>` | :ref:`has_transition<class_AnimationNodeStateMachine_method_has_transition>`\ (\ from\: :ref:`StringName<class_StringName>`, to\: :ref:`StringName<class_StringName>`\ ) |const| |
  67. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | |void| | :ref:`remove_node<class_AnimationNodeStateMachine_method_remove_node>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
  69. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | |void| | :ref:`remove_transition<class_AnimationNodeStateMachine_method_remove_transition>`\ (\ from\: :ref:`StringName<class_StringName>`, to\: :ref:`StringName<class_StringName>`\ ) |
  71. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | |void| | :ref:`remove_transition_by_index<class_AnimationNodeStateMachine_method_remove_transition_by_index>`\ (\ idx\: :ref:`int<class_int>`\ ) |
  73. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | |void| | :ref:`rename_node<class_AnimationNodeStateMachine_method_rename_node>`\ (\ name\: :ref:`StringName<class_StringName>`, new_name\: :ref:`StringName<class_StringName>`\ ) |
  75. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | |void| | :ref:`replace_node<class_AnimationNodeStateMachine_method_replace_node>`\ (\ name\: :ref:`StringName<class_StringName>`, node\: :ref:`AnimationNode<class_AnimationNode>`\ ) |
  77. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | |void| | :ref:`set_graph_offset<class_AnimationNodeStateMachine_method_set_graph_offset>`\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) |
  79. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | |void| | :ref:`set_node_position<class_AnimationNodeStateMachine_method_set_node_position>`\ (\ name\: :ref:`StringName<class_StringName>`, position\: :ref:`Vector2<class_Vector2>`\ ) |
  81. +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. .. rst-class:: classref-section-separator
  83. ----
  84. .. rst-class:: classref-descriptions-group
  85. Enumerations
  86. ------------
  87. .. _enum_AnimationNodeStateMachine_StateMachineType:
  88. .. rst-class:: classref-enumeration
  89. enum **StateMachineType**: :ref:`🔗<enum_AnimationNodeStateMachine_StateMachineType>`
  90. .. _class_AnimationNodeStateMachine_constant_STATE_MACHINE_TYPE_ROOT:
  91. .. rst-class:: classref-enumeration-constant
  92. :ref:`StateMachineType<enum_AnimationNodeStateMachine_StateMachineType>` **STATE_MACHINE_TYPE_ROOT** = ``0``
  93. Seeking to the beginning is treated as playing from the start state. Transition to the end state is treated as exiting the state machine.
  94. .. _class_AnimationNodeStateMachine_constant_STATE_MACHINE_TYPE_NESTED:
  95. .. rst-class:: classref-enumeration-constant
  96. :ref:`StateMachineType<enum_AnimationNodeStateMachine_StateMachineType>` **STATE_MACHINE_TYPE_NESTED** = ``1``
  97. Seeking to the beginning is treated as seeking to the beginning of the animation in the current state. Transition to the end state, or the absence of transitions in each state, is treated as exiting the state machine.
  98. .. _class_AnimationNodeStateMachine_constant_STATE_MACHINE_TYPE_GROUPED:
  99. .. rst-class:: classref-enumeration-constant
  100. :ref:`StateMachineType<enum_AnimationNodeStateMachine_StateMachineType>` **STATE_MACHINE_TYPE_GROUPED** = ``2``
  101. This is a grouped state machine that can be controlled from a parent state machine. It does not work independently. There must be a state machine with :ref:`state_machine_type<class_AnimationNodeStateMachine_property_state_machine_type>` of :ref:`STATE_MACHINE_TYPE_ROOT<class_AnimationNodeStateMachine_constant_STATE_MACHINE_TYPE_ROOT>` or :ref:`STATE_MACHINE_TYPE_NESTED<class_AnimationNodeStateMachine_constant_STATE_MACHINE_TYPE_NESTED>` in the parent or ancestor.
  102. .. rst-class:: classref-section-separator
  103. ----
  104. .. rst-class:: classref-descriptions-group
  105. Property Descriptions
  106. ---------------------
  107. .. _class_AnimationNodeStateMachine_property_allow_transition_to_self:
  108. .. rst-class:: classref-property
  109. :ref:`bool<class_bool>` **allow_transition_to_self** = ``false`` :ref:`🔗<class_AnimationNodeStateMachine_property_allow_transition_to_self>`
  110. .. rst-class:: classref-property-setget
  111. - |void| **set_allow_transition_to_self**\ (\ value\: :ref:`bool<class_bool>`\ )
  112. - :ref:`bool<class_bool>` **is_allow_transition_to_self**\ (\ )
  113. If ``true``, allows teleport to the self state with :ref:`AnimationNodeStateMachinePlayback.travel<class_AnimationNodeStateMachinePlayback_method_travel>`. When the reset option is enabled in :ref:`AnimationNodeStateMachinePlayback.travel<class_AnimationNodeStateMachinePlayback_method_travel>`, the animation is restarted. If ``false``, nothing happens on the teleportation to the self state.
  114. .. rst-class:: classref-item-separator
  115. ----
  116. .. _class_AnimationNodeStateMachine_property_reset_ends:
  117. .. rst-class:: classref-property
  118. :ref:`bool<class_bool>` **reset_ends** = ``false`` :ref:`🔗<class_AnimationNodeStateMachine_property_reset_ends>`
  119. .. rst-class:: classref-property-setget
  120. - |void| **set_reset_ends**\ (\ value\: :ref:`bool<class_bool>`\ )
  121. - :ref:`bool<class_bool>` **are_ends_reset**\ (\ )
  122. If ``true``, treat the cross-fade to the start and end nodes as a blend with the RESET animation.
  123. In most cases, when additional cross-fades are performed in the parent :ref:`AnimationNode<class_AnimationNode>` of the state machine, setting this property to ``false`` and matching the cross-fade time of the parent :ref:`AnimationNode<class_AnimationNode>` and the state machine's start node and end node gives good results.
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_AnimationNodeStateMachine_property_state_machine_type:
  127. .. rst-class:: classref-property
  128. :ref:`StateMachineType<enum_AnimationNodeStateMachine_StateMachineType>` **state_machine_type** = ``0`` :ref:`🔗<class_AnimationNodeStateMachine_property_state_machine_type>`
  129. .. rst-class:: classref-property-setget
  130. - |void| **set_state_machine_type**\ (\ value\: :ref:`StateMachineType<enum_AnimationNodeStateMachine_StateMachineType>`\ )
  131. - :ref:`StateMachineType<enum_AnimationNodeStateMachine_StateMachineType>` **get_state_machine_type**\ (\ )
  132. This property can define the process of transitions for different use cases. See also :ref:`StateMachineType<enum_AnimationNodeStateMachine_StateMachineType>`.
  133. .. rst-class:: classref-section-separator
  134. ----
  135. .. rst-class:: classref-descriptions-group
  136. Method Descriptions
  137. -------------------
  138. .. _class_AnimationNodeStateMachine_method_add_node:
  139. .. rst-class:: classref-method
  140. |void| **add_node**\ (\ name\: :ref:`StringName<class_StringName>`, node\: :ref:`AnimationNode<class_AnimationNode>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_AnimationNodeStateMachine_method_add_node>`
  141. Adds a new animation node to the graph. The ``position`` is used for display in the editor.
  142. .. rst-class:: classref-item-separator
  143. ----
  144. .. _class_AnimationNodeStateMachine_method_add_transition:
  145. .. rst-class:: classref-method
  146. |void| **add_transition**\ (\ from\: :ref:`StringName<class_StringName>`, to\: :ref:`StringName<class_StringName>`, transition\: :ref:`AnimationNodeStateMachineTransition<class_AnimationNodeStateMachineTransition>`\ ) :ref:`🔗<class_AnimationNodeStateMachine_method_add_transition>`
  147. Adds a transition between the given animation nodes.
  148. .. rst-class:: classref-item-separator
  149. ----
  150. .. _class_AnimationNodeStateMachine_method_get_graph_offset:
  151. .. rst-class:: classref-method
  152. :ref:`Vector2<class_Vector2>` **get_graph_offset**\ (\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_get_graph_offset>`
  153. Returns the draw offset of the graph. Used for display in the editor.
  154. .. rst-class:: classref-item-separator
  155. ----
  156. .. _class_AnimationNodeStateMachine_method_get_node:
  157. .. rst-class:: classref-method
  158. :ref:`AnimationNode<class_AnimationNode>` **get_node**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_get_node>`
  159. Returns the animation node with the given name.
  160. .. rst-class:: classref-item-separator
  161. ----
  162. .. _class_AnimationNodeStateMachine_method_get_node_name:
  163. .. rst-class:: classref-method
  164. :ref:`StringName<class_StringName>` **get_node_name**\ (\ node\: :ref:`AnimationNode<class_AnimationNode>`\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_get_node_name>`
  165. Returns the given animation node's name.
  166. .. rst-class:: classref-item-separator
  167. ----
  168. .. _class_AnimationNodeStateMachine_method_get_node_position:
  169. .. rst-class:: classref-method
  170. :ref:`Vector2<class_Vector2>` **get_node_position**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_get_node_position>`
  171. Returns the given animation node's coordinates. Used for display in the editor.
  172. .. rst-class:: classref-item-separator
  173. ----
  174. .. _class_AnimationNodeStateMachine_method_get_transition:
  175. .. rst-class:: classref-method
  176. :ref:`AnimationNodeStateMachineTransition<class_AnimationNodeStateMachineTransition>` **get_transition**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_get_transition>`
  177. Returns the given transition.
  178. .. rst-class:: classref-item-separator
  179. ----
  180. .. _class_AnimationNodeStateMachine_method_get_transition_count:
  181. .. rst-class:: classref-method
  182. :ref:`int<class_int>` **get_transition_count**\ (\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_get_transition_count>`
  183. Returns the number of connections in the graph.
  184. .. rst-class:: classref-item-separator
  185. ----
  186. .. _class_AnimationNodeStateMachine_method_get_transition_from:
  187. .. rst-class:: classref-method
  188. :ref:`StringName<class_StringName>` **get_transition_from**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_get_transition_from>`
  189. Returns the given transition's start node.
  190. .. rst-class:: classref-item-separator
  191. ----
  192. .. _class_AnimationNodeStateMachine_method_get_transition_to:
  193. .. rst-class:: classref-method
  194. :ref:`StringName<class_StringName>` **get_transition_to**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_get_transition_to>`
  195. Returns the given transition's end node.
  196. .. rst-class:: classref-item-separator
  197. ----
  198. .. _class_AnimationNodeStateMachine_method_has_node:
  199. .. rst-class:: classref-method
  200. :ref:`bool<class_bool>` **has_node**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_has_node>`
  201. Returns ``true`` if the graph contains the given animation node.
  202. .. rst-class:: classref-item-separator
  203. ----
  204. .. _class_AnimationNodeStateMachine_method_has_transition:
  205. .. rst-class:: classref-method
  206. :ref:`bool<class_bool>` **has_transition**\ (\ from\: :ref:`StringName<class_StringName>`, to\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_AnimationNodeStateMachine_method_has_transition>`
  207. Returns ``true`` if there is a transition between the given animation nodes.
  208. .. rst-class:: classref-item-separator
  209. ----
  210. .. _class_AnimationNodeStateMachine_method_remove_node:
  211. .. rst-class:: classref-method
  212. |void| **remove_node**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationNodeStateMachine_method_remove_node>`
  213. Deletes the given animation node from the graph.
  214. .. rst-class:: classref-item-separator
  215. ----
  216. .. _class_AnimationNodeStateMachine_method_remove_transition:
  217. .. rst-class:: classref-method
  218. |void| **remove_transition**\ (\ from\: :ref:`StringName<class_StringName>`, to\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationNodeStateMachine_method_remove_transition>`
  219. Deletes the transition between the two specified animation nodes.
  220. .. rst-class:: classref-item-separator
  221. ----
  222. .. _class_AnimationNodeStateMachine_method_remove_transition_by_index:
  223. .. rst-class:: classref-method
  224. |void| **remove_transition_by_index**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_AnimationNodeStateMachine_method_remove_transition_by_index>`
  225. Deletes the given transition by index.
  226. .. rst-class:: classref-item-separator
  227. ----
  228. .. _class_AnimationNodeStateMachine_method_rename_node:
  229. .. rst-class:: classref-method
  230. |void| **rename_node**\ (\ name\: :ref:`StringName<class_StringName>`, new_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationNodeStateMachine_method_rename_node>`
  231. Renames the given animation node.
  232. .. rst-class:: classref-item-separator
  233. ----
  234. .. _class_AnimationNodeStateMachine_method_replace_node:
  235. .. rst-class:: classref-method
  236. |void| **replace_node**\ (\ name\: :ref:`StringName<class_StringName>`, node\: :ref:`AnimationNode<class_AnimationNode>`\ ) :ref:`🔗<class_AnimationNodeStateMachine_method_replace_node>`
  237. Replaces the given animation node with a new animation node.
  238. .. rst-class:: classref-item-separator
  239. ----
  240. .. _class_AnimationNodeStateMachine_method_set_graph_offset:
  241. .. rst-class:: classref-method
  242. |void| **set_graph_offset**\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_AnimationNodeStateMachine_method_set_graph_offset>`
  243. Sets the draw offset of the graph. Used for display in the editor.
  244. .. rst-class:: classref-item-separator
  245. ----
  246. .. _class_AnimationNodeStateMachine_method_set_node_position:
  247. .. rst-class:: classref-method
  248. |void| **set_node_position**\ (\ name\: :ref:`StringName<class_StringName>`, position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_AnimationNodeStateMachine_method_set_node_position>`
  249. Sets the animation node's coordinates. Used for display in the editor.
  250. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  251. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  252. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  253. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  254. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  255. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  256. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  257. .. |void| replace:: :abbr:`void (No return value.)`