class_conetwistjoint.rst 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/ConeTwistJoint.xml.
  6. .. _class_ConeTwistJoint:
  7. ConeTwistJoint
  8. ==============
  9. **Inherits:** :ref:`Joint<class_Joint>` **<** :ref:`Spatial<class_Spatial>` **<** :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:`Joint<class_Joint>`.
  15. The twist axis is initiated as the X axis of the :ref:`Joint<class_Joint>`.
  16. Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies. See also :ref:`Generic6DOFJoint<class_Generic6DOFJoint>`.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +---------------------------+-------------------------------------------------------------+-----------+
  23. | :ref:`float<class_float>` | :ref:`bias<class_ConeTwistJoint_property_bias>` | ``0.3`` |
  24. +---------------------------+-------------------------------------------------------------+-----------+
  25. | :ref:`float<class_float>` | :ref:`relaxation<class_ConeTwistJoint_property_relaxation>` | ``1.0`` |
  26. +---------------------------+-------------------------------------------------------------+-----------+
  27. | :ref:`float<class_float>` | :ref:`softness<class_ConeTwistJoint_property_softness>` | ``0.8`` |
  28. +---------------------------+-------------------------------------------------------------+-----------+
  29. | :ref:`float<class_float>` | :ref:`swing_span<class_ConeTwistJoint_property_swing_span>` | ``45.0`` |
  30. +---------------------------+-------------------------------------------------------------+-----------+
  31. | :ref:`float<class_float>` | :ref:`twist_span<class_ConeTwistJoint_property_twist_span>` | ``180.0`` |
  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_ConeTwistJoint_method_get_param>` **(** :ref:`Param<enum_ConeTwistJoint_Param>` param **)** |const| |
  40. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`set_param<class_ConeTwistJoint_method_set_param>` **(** :ref:`Param<enum_ConeTwistJoint_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_ConeTwistJoint_Param:
  49. .. rst-class:: classref-enumeration
  50. enum **Param**:
  51. .. _class_ConeTwistJoint_constant_PARAM_SWING_SPAN:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`Param<enum_ConeTwistJoint_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 **ConeTwistJoint**.
  57. If below 0.05, this behavior is locked.
  58. .. _class_ConeTwistJoint_constant_PARAM_TWIST_SPAN:
  59. .. rst-class:: classref-enumeration-constant
  60. :ref:`Param<enum_ConeTwistJoint_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_ConeTwistJoint_constant_PARAM_BIAS:
  64. .. rst-class:: classref-enumeration-constant
  65. :ref:`Param<enum_ConeTwistJoint_Param>` **PARAM_BIAS** = ``2``
  66. The speed with which the swing or twist will take place.
  67. The higher, the faster.
  68. .. _class_ConeTwistJoint_constant_PARAM_SOFTNESS:
  69. .. rst-class:: classref-enumeration-constant
  70. :ref:`Param<enum_ConeTwistJoint_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_ConeTwistJoint_constant_PARAM_RELAXATION:
  73. .. rst-class:: classref-enumeration-constant
  74. :ref:`Param<enum_ConeTwistJoint_Param>` **PARAM_RELAXATION** = ``4``
  75. Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
  76. .. _class_ConeTwistJoint_constant_PARAM_MAX:
  77. .. rst-class:: classref-enumeration-constant
  78. :ref:`Param<enum_ConeTwistJoint_Param>` **PARAM_MAX** = ``5``
  79. Represents the size of the :ref:`Param<enum_ConeTwistJoint_Param>` enum.
  80. .. rst-class:: classref-section-separator
  81. ----
  82. .. rst-class:: classref-descriptions-group
  83. Property Descriptions
  84. ---------------------
  85. .. _class_ConeTwistJoint_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_ConeTwistJoint_Param>` param, :ref:`float<class_float>` value **)**
  90. - :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_ConeTwistJoint_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_ConeTwistJoint_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_ConeTwistJoint_Param>` param, :ref:`float<class_float>` value **)**
  100. - :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_ConeTwistJoint_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_ConeTwistJoint_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_ConeTwistJoint_Param>` param, :ref:`float<class_float>` value **)**
  109. - :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_ConeTwistJoint_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_ConeTwistJoint_property_swing_span:
  114. .. rst-class:: classref-property
  115. :ref:`float<class_float>` **swing_span** = ``45.0``
  116. Swing is rotation from side to side, around the axis perpendicular to the twist axis.
  117. The swing span defines, how much rotation will not get corrected along the swing axis.
  118. Could be defined as looseness in the **ConeTwistJoint**.
  119. If below 0.05, this behavior is locked.
  120. .. rst-class:: classref-item-separator
  121. ----
  122. .. _class_ConeTwistJoint_property_twist_span:
  123. .. rst-class:: classref-property
  124. :ref:`float<class_float>` **twist_span** = ``180.0``
  125. Twist is the rotation around the twist axis, this value defined how far the joint can twist.
  126. Twist is locked if below 0.05.
  127. .. rst-class:: classref-section-separator
  128. ----
  129. .. rst-class:: classref-descriptions-group
  130. Method Descriptions
  131. -------------------
  132. .. _class_ConeTwistJoint_method_get_param:
  133. .. rst-class:: classref-method
  134. :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_ConeTwistJoint_Param>` param **)** |const|
  135. .. container:: contribute
  136. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _class_ConeTwistJoint_method_set_param:
  140. .. rst-class:: classref-method
  141. void **set_param** **(** :ref:`Param<enum_ConeTwistJoint_Param>` param, :ref:`float<class_float>` value **)**
  142. .. container:: contribute
  143. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  144. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  145. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  146. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  147. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`