class_skeletonmodification2dphysicalbones.rst 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. **Inherits:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A modification that applies the transforms of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to :ref:`Bone2D<class_Bone2D>` nodes.
  11. Description
  12. -----------
  13. 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.
  14. Properties
  15. ----------
  16. +-----------------------+------------------------------------------------------------------------------------------------------------------+-------+
  17. | :ref:`int<class_int>` | :ref:`physical_bone_chain_length<class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length>` | ``0`` |
  18. +-----------------------+------------------------------------------------------------------------------------------------------------------+-------+
  19. Methods
  20. -------
  21. +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`fetch_physical_bones<class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones>` **(** **)** |
  23. +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`NodePath<class_NodePath>` | :ref:`get_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node>` **(** :ref:`int<class_int>` joint_idx **)** |const| |
  25. +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`set_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node>` **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` physicalbone2d_node **)** |
  27. +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`start_simulation<class_SkeletonModification2DPhysicalBones_method_start_simulation>` **(** :ref:`StringName[]<class_StringName>` bones=[] **)** |
  29. +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`stop_simulation<class_SkeletonModification2DPhysicalBones_method_stop_simulation>` **(** :ref:`StringName[]<class_StringName>` bones=[] **)** |
  31. +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. Property Descriptions
  33. ---------------------
  34. .. _class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length:
  35. - :ref:`int<class_int>` **physical_bone_chain_length**
  36. +-----------+---------------------------------------+
  37. | *Default* | ``0`` |
  38. +-----------+---------------------------------------+
  39. | *Setter* | set_physical_bone_chain_length(value) |
  40. +-----------+---------------------------------------+
  41. | *Getter* | get_physical_bone_chain_length() |
  42. +-----------+---------------------------------------+
  43. The amount of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes linked in this modification.
  44. Method Descriptions
  45. -------------------
  46. .. _class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones:
  47. - void **fetch_physical_bones** **(** **)**
  48. Empties the list of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes and populates it will all :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes that are children of the :ref:`Skeleton2D<class_Skeleton2D>`.
  49. ----
  50. .. _class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node:
  51. - :ref:`NodePath<class_NodePath>` **get_physical_bone_node** **(** :ref:`int<class_int>` joint_idx **)** |const|
  52. Returns the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``.
  53. ----
  54. .. _class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node:
  55. - void **set_physical_bone_node** **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` physicalbone2d_node **)**
  56. Sets the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``.
  57. \ **Note:** This is just the index used for this modification, not the bone index used in the :ref:`Skeleton2D<class_Skeleton2D>`.
  58. ----
  59. .. _class_SkeletonModification2DPhysicalBones_method_start_simulation:
  60. - void **start_simulation** **(** :ref:`StringName[]<class_StringName>` bones=[] **)**
  61. Tell the :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to start simulating and interacting with the physics world.
  62. 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.
  63. ----
  64. .. _class_SkeletonModification2DPhysicalBones_method_stop_simulation:
  65. - void **stop_simulation** **(** :ref:`StringName[]<class_StringName>` bones=[] **)**
  66. Tell the :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to stop simulating and interacting with the physics world.
  67. 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.
  68. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  69. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  70. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  71. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  72. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  73. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`