class_skeletonmodifier3d.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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/SkeletonModifier3D.xml.
  6. .. _class_SkeletonModifier3D:
  7. SkeletonModifier3D
  8. ==================
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`LookAtModifier3D<class_LookAtModifier3D>`, :ref:`PhysicalBoneSimulator3D<class_PhysicalBoneSimulator3D>`, :ref:`RetargetModifier3D<class_RetargetModifier3D>`, :ref:`SkeletonIK3D<class_SkeletonIK3D>`, :ref:`SpringBoneSimulator3D<class_SpringBoneSimulator3D>`, :ref:`XRBodyModifier3D<class_XRBodyModifier3D>`, :ref:`XRHandModifier3D<class_XRHandModifier3D>`
  11. A node that may modify a Skeleton3D's bones.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. **SkeletonModifier3D** retrieves a target :ref:`Skeleton3D<class_Skeleton3D>` by having a :ref:`Skeleton3D<class_Skeleton3D>` parent.
  16. If there is an :ref:`AnimationMixer<class_AnimationMixer>`, a modification always performs after playback process of the :ref:`AnimationMixer<class_AnimationMixer>`.
  17. This node should be used to implement custom IK solvers, constraints, or skeleton physics.
  18. .. rst-class:: classref-introduction-group
  19. Tutorials
  20. ---------
  21. - `Design of the Skeleton Modifier 3D <https://godotengine.org/article/design-of-the-skeleton-modifier-3d/>`__
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +---------------------------+---------------------------------------------------------------+----------+
  28. | :ref:`bool<class_bool>` | :ref:`active<class_SkeletonModifier3D_property_active>` | ``true`` |
  29. +---------------------------+---------------------------------------------------------------+----------+
  30. | :ref:`float<class_float>` | :ref:`influence<class_SkeletonModifier3D_property_influence>` | ``1.0`` |
  31. +---------------------------+---------------------------------------------------------------+----------+
  32. .. rst-class:: classref-reftable-group
  33. Methods
  34. -------
  35. .. table::
  36. :widths: auto
  37. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | |void| | :ref:`_process_modification<class_SkeletonModifier3D_private_method__process_modification>`\ (\ ) |virtual| |
  39. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | |void| | :ref:`_process_modification_with_delta<class_SkeletonModifier3D_private_method__process_modification_with_delta>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| |
  41. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_skeleton<class_SkeletonModifier3D_method_get_skeleton>`\ (\ ) |const| |
  43. +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. .. rst-class:: classref-section-separator
  45. ----
  46. .. rst-class:: classref-descriptions-group
  47. Signals
  48. -------
  49. .. _class_SkeletonModifier3D_signal_modification_processed:
  50. .. rst-class:: classref-signal
  51. **modification_processed**\ (\ ) :ref:`🔗<class_SkeletonModifier3D_signal_modification_processed>`
  52. Notifies when the modification have been finished.
  53. \ **Note:** If you want to get the modified bone pose by the modifier, you must use :ref:`Skeleton3D.get_bone_pose()<class_Skeleton3D_method_get_bone_pose>` or :ref:`Skeleton3D.get_bone_global_pose()<class_Skeleton3D_method_get_bone_global_pose>` at the moment this signal is fired.
  54. .. rst-class:: classref-section-separator
  55. ----
  56. .. rst-class:: classref-descriptions-group
  57. Enumerations
  58. ------------
  59. .. _enum_SkeletonModifier3D_BoneAxis:
  60. .. rst-class:: classref-enumeration
  61. enum **BoneAxis**: :ref:`🔗<enum_SkeletonModifier3D_BoneAxis>`
  62. .. _class_SkeletonModifier3D_constant_BONE_AXIS_PLUS_X:
  63. .. rst-class:: classref-enumeration-constant
  64. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_PLUS_X** = ``0``
  65. Enumerated value for the +X axis.
  66. .. _class_SkeletonModifier3D_constant_BONE_AXIS_MINUS_X:
  67. .. rst-class:: classref-enumeration-constant
  68. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_MINUS_X** = ``1``
  69. Enumerated value for the -X axis.
  70. .. _class_SkeletonModifier3D_constant_BONE_AXIS_PLUS_Y:
  71. .. rst-class:: classref-enumeration-constant
  72. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_PLUS_Y** = ``2``
  73. Enumerated value for the +Y axis.
  74. .. _class_SkeletonModifier3D_constant_BONE_AXIS_MINUS_Y:
  75. .. rst-class:: classref-enumeration-constant
  76. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_MINUS_Y** = ``3``
  77. Enumerated value for the -Y axis.
  78. .. _class_SkeletonModifier3D_constant_BONE_AXIS_PLUS_Z:
  79. .. rst-class:: classref-enumeration-constant
  80. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_PLUS_Z** = ``4``
  81. Enumerated value for the +Z axis.
  82. .. _class_SkeletonModifier3D_constant_BONE_AXIS_MINUS_Z:
  83. .. rst-class:: classref-enumeration-constant
  84. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **BONE_AXIS_MINUS_Z** = ``5``
  85. Enumerated value for the -Z axis.
  86. .. rst-class:: classref-section-separator
  87. ----
  88. .. rst-class:: classref-descriptions-group
  89. Property Descriptions
  90. ---------------------
  91. .. _class_SkeletonModifier3D_property_active:
  92. .. rst-class:: classref-property
  93. :ref:`bool<class_bool>` **active** = ``true`` :ref:`🔗<class_SkeletonModifier3D_property_active>`
  94. .. rst-class:: classref-property-setget
  95. - |void| **set_active**\ (\ value\: :ref:`bool<class_bool>`\ )
  96. - :ref:`bool<class_bool>` **is_active**\ (\ )
  97. If ``true``, the **SkeletonModifier3D** will be processing.
  98. .. rst-class:: classref-item-separator
  99. ----
  100. .. _class_SkeletonModifier3D_property_influence:
  101. .. rst-class:: classref-property
  102. :ref:`float<class_float>` **influence** = ``1.0`` :ref:`🔗<class_SkeletonModifier3D_property_influence>`
  103. .. rst-class:: classref-property-setget
  104. - |void| **set_influence**\ (\ value\: :ref:`float<class_float>`\ )
  105. - :ref:`float<class_float>` **get_influence**\ (\ )
  106. Sets the influence of the modification.
  107. \ **Note:** This value is used by :ref:`Skeleton3D<class_Skeleton3D>` to blend, so the **SkeletonModifier3D** should always apply only 100% of the result without interpolation.
  108. .. rst-class:: classref-section-separator
  109. ----
  110. .. rst-class:: classref-descriptions-group
  111. Method Descriptions
  112. -------------------
  113. .. _class_SkeletonModifier3D_private_method__process_modification:
  114. .. rst-class:: classref-method
  115. |void| **_process_modification**\ (\ ) |virtual| :ref:`🔗<class_SkeletonModifier3D_private_method__process_modification>`
  116. **Deprecated:** Use :ref:`_process_modification_with_delta()<class_SkeletonModifier3D_private_method__process_modification_with_delta>` instead.
  117. Override this virtual method to implement a custom skeleton modifier. You should do things like get the :ref:`Skeleton3D<class_Skeleton3D>`'s current pose and apply the pose here.
  118. \ :ref:`_process_modification()<class_SkeletonModifier3D_private_method__process_modification>` must not apply :ref:`influence<class_SkeletonModifier3D_property_influence>` to bone poses because the :ref:`Skeleton3D<class_Skeleton3D>` automatically applies influence to all bone poses set by the modifier.
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _class_SkeletonModifier3D_private_method__process_modification_with_delta:
  122. .. rst-class:: classref-method
  123. |void| **_process_modification_with_delta**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_SkeletonModifier3D_private_method__process_modification_with_delta>`
  124. Override this virtual method to implement a custom skeleton modifier. You should do things like get the :ref:`Skeleton3D<class_Skeleton3D>`'s current pose and apply the pose here.
  125. \ :ref:`_process_modification_with_delta()<class_SkeletonModifier3D_private_method__process_modification_with_delta>` must not apply :ref:`influence<class_SkeletonModifier3D_property_influence>` to bone poses because the :ref:`Skeleton3D<class_Skeleton3D>` automatically applies influence to all bone poses set by the modifier.
  126. \ ``delta`` is passed from parent :ref:`Skeleton3D<class_Skeleton3D>`. See also :ref:`Skeleton3D.advance()<class_Skeleton3D_method_advance>`.
  127. .. rst-class:: classref-item-separator
  128. ----
  129. .. _class_SkeletonModifier3D_method_get_skeleton:
  130. .. rst-class:: classref-method
  131. :ref:`Skeleton3D<class_Skeleton3D>` **get_skeleton**\ (\ ) |const| :ref:`🔗<class_SkeletonModifier3D_method_get_skeleton>`
  132. Get parent :ref:`Skeleton3D<class_Skeleton3D>` node if found.
  133. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  134. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  135. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  136. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  137. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  138. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  139. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  140. .. |void| replace:: :abbr:`void (No return value.)`