class_conetwistjoint3d.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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/ConeTwistJoint3D.xml.
  6. .. _class_ConeTwistJoint3D:
  7. ConeTwistJoint3D
  8. ================
  9. **Inherits:** :ref:`Joint3D<class_Joint3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. The twist axis is initiated as the X axis of the **ConeTwistJoint3D**. Once the physics bodies swing, the twist axis is calculated as the middle of the X axes of the joint in the local space of the two physics bodies. Useful for limbs like shoulders and hips, lamps hanging off a ceiling, etc.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +---------------------------+---------------------------------------------------------------+--------------+
  21. | :ref:`float<class_float>` | :ref:`bias<class_ConeTwistJoint3D_property_bias>` | ``0.3`` |
  22. +---------------------------+---------------------------------------------------------------+--------------+
  23. | :ref:`float<class_float>` | :ref:`relaxation<class_ConeTwistJoint3D_property_relaxation>` | ``1.0`` |
  24. +---------------------------+---------------------------------------------------------------+--------------+
  25. | :ref:`float<class_float>` | :ref:`softness<class_ConeTwistJoint3D_property_softness>` | ``0.8`` |
  26. +---------------------------+---------------------------------------------------------------+--------------+
  27. | :ref:`float<class_float>` | :ref:`swing_span<class_ConeTwistJoint3D_property_swing_span>` | ``0.785398`` |
  28. +---------------------------+---------------------------------------------------------------+--------------+
  29. | :ref:`float<class_float>` | :ref:`twist_span<class_ConeTwistJoint3D_property_twist_span>` | ``3.14159`` |
  30. +---------------------------+---------------------------------------------------------------+--------------+
  31. .. rst-class:: classref-reftable-group
  32. Methods
  33. -------
  34. .. table::
  35. :widths: auto
  36. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`float<class_float>` | :ref:`get_param<class_ConeTwistJoint3D_method_get_param>`\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`\ ) |const| |
  38. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | |void| | :ref:`set_param<class_ConeTwistJoint3D_method_set_param>`\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) |
  40. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Enumerations
  45. ------------
  46. .. _enum_ConeTwistJoint3D_Param:
  47. .. rst-class:: classref-enumeration
  48. enum **Param**: :ref:`🔗<enum_ConeTwistJoint3D_Param>`
  49. .. _class_ConeTwistJoint3D_constant_PARAM_SWING_SPAN:
  50. .. rst-class:: classref-enumeration-constant
  51. :ref:`Param<enum_ConeTwistJoint3D_Param>` **PARAM_SWING_SPAN** = ``0``
  52. Swing is rotation from side to side, around the axis perpendicular to the twist axis.
  53. The swing span defines, how much rotation will not get corrected along the swing axis.
  54. Could be defined as looseness in the **ConeTwistJoint3D**.
  55. If below 0.05, this behavior is locked.
  56. .. _class_ConeTwistJoint3D_constant_PARAM_TWIST_SPAN:
  57. .. rst-class:: classref-enumeration-constant
  58. :ref:`Param<enum_ConeTwistJoint3D_Param>` **PARAM_TWIST_SPAN** = ``1``
  59. Twist is the rotation around the twist axis, this value defined how far the joint can twist.
  60. Twist is locked if below 0.05.
  61. .. _class_ConeTwistJoint3D_constant_PARAM_BIAS:
  62. .. rst-class:: classref-enumeration-constant
  63. :ref:`Param<enum_ConeTwistJoint3D_Param>` **PARAM_BIAS** = ``2``
  64. The speed with which the swing or twist will take place.
  65. The higher, the faster.
  66. .. _class_ConeTwistJoint3D_constant_PARAM_SOFTNESS:
  67. .. rst-class:: classref-enumeration-constant
  68. :ref:`Param<enum_ConeTwistJoint3D_Param>` **PARAM_SOFTNESS** = ``3``
  69. The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.
  70. .. _class_ConeTwistJoint3D_constant_PARAM_RELAXATION:
  71. .. rst-class:: classref-enumeration-constant
  72. :ref:`Param<enum_ConeTwistJoint3D_Param>` **PARAM_RELAXATION** = ``4``
  73. Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
  74. .. _class_ConeTwistJoint3D_constant_PARAM_MAX:
  75. .. rst-class:: classref-enumeration-constant
  76. :ref:`Param<enum_ConeTwistJoint3D_Param>` **PARAM_MAX** = ``5``
  77. Represents the size of the :ref:`Param<enum_ConeTwistJoint3D_Param>` enum.
  78. .. rst-class:: classref-section-separator
  79. ----
  80. .. rst-class:: classref-descriptions-group
  81. Property Descriptions
  82. ---------------------
  83. .. _class_ConeTwistJoint3D_property_bias:
  84. .. rst-class:: classref-property
  85. :ref:`float<class_float>` **bias** = ``0.3`` :ref:`🔗<class_ConeTwistJoint3D_property_bias>`
  86. .. rst-class:: classref-property-setget
  87. - |void| **set_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
  88. - :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`\ ) |const|
  89. The speed with which the swing or twist will take place.
  90. The higher, the faster.
  91. .. rst-class:: classref-item-separator
  92. ----
  93. .. _class_ConeTwistJoint3D_property_relaxation:
  94. .. rst-class:: classref-property
  95. :ref:`float<class_float>` **relaxation** = ``1.0`` :ref:`🔗<class_ConeTwistJoint3D_property_relaxation>`
  96. .. rst-class:: classref-property-setget
  97. - |void| **set_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
  98. - :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`\ ) |const|
  99. Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_ConeTwistJoint3D_property_softness:
  103. .. rst-class:: classref-property
  104. :ref:`float<class_float>` **softness** = ``0.8`` :ref:`🔗<class_ConeTwistJoint3D_property_softness>`
  105. .. rst-class:: classref-property-setget
  106. - |void| **set_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
  107. - :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`\ ) |const|
  108. The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.
  109. .. rst-class:: classref-item-separator
  110. ----
  111. .. _class_ConeTwistJoint3D_property_swing_span:
  112. .. rst-class:: classref-property
  113. :ref:`float<class_float>` **swing_span** = ``0.785398`` :ref:`🔗<class_ConeTwistJoint3D_property_swing_span>`
  114. .. rst-class:: classref-property-setget
  115. - |void| **set_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
  116. - :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`\ ) |const|
  117. Swing is rotation from side to side, around the axis perpendicular to the twist axis.
  118. The swing span defines, how much rotation will not get corrected along the swing axis.
  119. Could be defined as looseness in the **ConeTwistJoint3D**.
  120. If below 0.05, this behavior is locked.
  121. .. rst-class:: classref-item-separator
  122. ----
  123. .. _class_ConeTwistJoint3D_property_twist_span:
  124. .. rst-class:: classref-property
  125. :ref:`float<class_float>` **twist_span** = ``3.14159`` :ref:`🔗<class_ConeTwistJoint3D_property_twist_span>`
  126. .. rst-class:: classref-property-setget
  127. - |void| **set_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`, value\: :ref:`float<class_float>`\ )
  128. - :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`\ ) |const|
  129. Twist is the rotation around the twist axis, this value defined how far the joint can twist.
  130. Twist is locked if below 0.05.
  131. .. rst-class:: classref-section-separator
  132. ----
  133. .. rst-class:: classref-descriptions-group
  134. Method Descriptions
  135. -------------------
  136. .. _class_ConeTwistJoint3D_method_get_param:
  137. .. rst-class:: classref-method
  138. :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`\ ) |const| :ref:`🔗<class_ConeTwistJoint3D_method_get_param>`
  139. Returns the value of the specified parameter.
  140. .. rst-class:: classref-item-separator
  141. ----
  142. .. _class_ConeTwistJoint3D_method_set_param:
  143. .. rst-class:: classref-method
  144. |void| **set_param**\ (\ param\: :ref:`Param<enum_ConeTwistJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_ConeTwistJoint3D_method_set_param>`
  145. Sets the value of the specified parameter.
  146. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  147. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  148. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  149. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  150. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  151. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  152. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  153. .. |void| replace:: :abbr:`void (No return value.)`