class_conetwistjoint3d.rst 9.4 KB

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