class_skeletonmodification2dphysicalbones.rst 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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/SkeletonModification2DPhysicalBones.xml.
  6. .. _class_SkeletonModification2DPhysicalBones:
  7. SkeletonModification2DPhysicalBones
  8. ===================================
  9. **Experimental:** Physical bones may be changed in the future to perform the position update of :ref:`Bone2D<class_Bone2D>` on their own, without needing this resource.
  10. **Inherits:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  11. A modification that applies the transforms of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to :ref:`Bone2D<class_Bone2D>` nodes.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. This modification takes the transforms of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes and applies them to :ref:`Bone2D<class_Bone2D>` nodes. This allows the :ref:`Bone2D<class_Bone2D>` nodes to react to physics thanks to the linked :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-----------------------+------------------------------------------------------------------------------------------------------------------+-------+
  22. | :ref:`int<class_int>` | :ref:`physical_bone_chain_length<class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length>` | ``0`` |
  23. +-----------------------+------------------------------------------------------------------------------------------------------------------+-------+
  24. .. rst-class:: classref-reftable-group
  25. Methods
  26. -------
  27. .. table::
  28. :widths: auto
  29. +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | |void| | :ref:`fetch_physical_bones<class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones>`\ (\ ) |
  31. +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`NodePath<class_NodePath>` | :ref:`get_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| |
  33. +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | |void| | :ref:`set_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node>`\ (\ joint_idx\: :ref:`int<class_int>`, physicalbone2d_node\: :ref:`NodePath<class_NodePath>`\ ) |
  35. +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | |void| | :ref:`start_simulation<class_SkeletonModification2DPhysicalBones_method_start_simulation>`\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) |
  37. +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | |void| | :ref:`stop_simulation<class_SkeletonModification2DPhysicalBones_method_stop_simulation>`\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) |
  39. +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. .. rst-class:: classref-section-separator
  41. ----
  42. .. rst-class:: classref-descriptions-group
  43. Property Descriptions
  44. ---------------------
  45. .. _class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length:
  46. .. rst-class:: classref-property
  47. :ref:`int<class_int>` **physical_bone_chain_length** = ``0`` :ref:`🔗<class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length>`
  48. .. rst-class:: classref-property-setget
  49. - |void| **set_physical_bone_chain_length**\ (\ value\: :ref:`int<class_int>`\ )
  50. - :ref:`int<class_int>` **get_physical_bone_chain_length**\ (\ )
  51. The number of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes linked in this modification.
  52. .. rst-class:: classref-section-separator
  53. ----
  54. .. rst-class:: classref-descriptions-group
  55. Method Descriptions
  56. -------------------
  57. .. _class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones:
  58. .. rst-class:: classref-method
  59. |void| **fetch_physical_bones**\ (\ ) :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones>`
  60. Empties the list of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes and populates it with all :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes that are children of the :ref:`Skeleton2D<class_Skeleton2D>`.
  61. .. rst-class:: classref-item-separator
  62. ----
  63. .. _class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node:
  64. .. rst-class:: classref-method
  65. :ref:`NodePath<class_NodePath>` **get_physical_bone_node**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node>`
  66. Returns the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``.
  67. .. rst-class:: classref-item-separator
  68. ----
  69. .. _class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node:
  70. .. rst-class:: classref-method
  71. |void| **set_physical_bone_node**\ (\ joint_idx\: :ref:`int<class_int>`, physicalbone2d_node\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node>`
  72. Sets the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``.
  73. \ **Note:** This is just the index used for this modification, not the bone index used in the :ref:`Skeleton2D<class_Skeleton2D>`.
  74. .. rst-class:: classref-item-separator
  75. ----
  76. .. _class_SkeletonModification2DPhysicalBones_method_start_simulation:
  77. .. rst-class:: classref-method
  78. |void| **start_simulation**\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_start_simulation>`
  79. Tell the :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to start simulating and interacting with the physics world.
  80. Optionally, an array of bone names can be passed to this function, and that will cause only :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes with those names to start simulating.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_SkeletonModification2DPhysicalBones_method_stop_simulation:
  84. .. rst-class:: classref-method
  85. |void| **stop_simulation**\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_stop_simulation>`
  86. Tell the :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to stop simulating and interacting with the physics world.
  87. Optionally, an array of bone names can be passed to this function, and that will cause only :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes with those names to stop simulating.
  88. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  89. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  90. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  91. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  92. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  93. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  94. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  95. .. |void| replace:: :abbr:`void (No return value.)`