class_hingejoint3d.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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/HingeJoint3D.xml.
  6. .. _class_HingeJoint3D:
  7. HingeJoint3D
  8. ============
  9. **Inherits:** :ref:`Joint3D<class_Joint3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A hinge between two 3D PhysicsBodies.
  11. Description
  12. -----------
  13. A HingeJoint3D normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. See also :ref:`Generic6DOFJoint3D<class_Generic6DOFJoint3D>`.
  14. Properties
  15. ----------
  16. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  17. | :ref:`float<class_float>` | :ref:`angular_limit/bias<class_HingeJoint3D_property_angular_limit/bias>` | ``0.3`` |
  18. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  19. | :ref:`bool<class_bool>` | :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` | ``false`` |
  20. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  21. | :ref:`float<class_float>` | :ref:`angular_limit/lower<class_HingeJoint3D_property_angular_limit/lower>` | ``-90.0`` |
  22. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  23. | :ref:`float<class_float>` | :ref:`angular_limit/relaxation<class_HingeJoint3D_property_angular_limit/relaxation>` | ``1.0`` |
  24. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  25. | :ref:`float<class_float>` | :ref:`angular_limit/softness<class_HingeJoint3D_property_angular_limit/softness>` | ``0.9`` |
  26. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  27. | :ref:`float<class_float>` | :ref:`angular_limit/upper<class_HingeJoint3D_property_angular_limit/upper>` | ``90.0`` |
  28. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  29. | :ref:`bool<class_bool>` | :ref:`motor/enable<class_HingeJoint3D_property_motor/enable>` | ``false`` |
  30. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  31. | :ref:`float<class_float>` | :ref:`motor/max_impulse<class_HingeJoint3D_property_motor/max_impulse>` | ``1.0`` |
  32. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  33. | :ref:`float<class_float>` | :ref:`motor/target_velocity<class_HingeJoint3D_property_motor/target_velocity>` | ``1.0`` |
  34. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  35. | :ref:`float<class_float>` | :ref:`params/bias<class_HingeJoint3D_property_params/bias>` | ``0.3`` |
  36. +---------------------------+---------------------------------------------------------------------------------------+-----------+
  37. Methods
  38. -------
  39. +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`bool<class_bool>` | :ref:`get_flag<class_HingeJoint3D_method_get_flag>` **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag **)** |const| |
  41. +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`float<class_float>` | :ref:`get_param<class_HingeJoint3D_method_get_param>` **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| |
  43. +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | void | :ref:`set_flag<class_HingeJoint3D_method_set_flag>` **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag, :ref:`bool<class_bool>` enabled **)** |
  45. +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | void | :ref:`set_param<class_HingeJoint3D_method_set_param>` **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** |
  47. +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
  48. Enumerations
  49. ------------
  50. .. _enum_HingeJoint3D_Param:
  51. .. _class_HingeJoint3D_constant_PARAM_BIAS:
  52. .. _class_HingeJoint3D_constant_PARAM_LIMIT_UPPER:
  53. .. _class_HingeJoint3D_constant_PARAM_LIMIT_LOWER:
  54. .. _class_HingeJoint3D_constant_PARAM_LIMIT_BIAS:
  55. .. _class_HingeJoint3D_constant_PARAM_LIMIT_SOFTNESS:
  56. .. _class_HingeJoint3D_constant_PARAM_LIMIT_RELAXATION:
  57. .. _class_HingeJoint3D_constant_PARAM_MOTOR_TARGET_VELOCITY:
  58. .. _class_HingeJoint3D_constant_PARAM_MOTOR_MAX_IMPULSE:
  59. .. _class_HingeJoint3D_constant_PARAM_MAX:
  60. enum **Param**:
  61. - **PARAM_BIAS** = **0** --- The speed with which the two bodies get pulled together when they move in different directions.
  62. - **PARAM_LIMIT_UPPER** = **1** --- The maximum rotation. Only active if :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` is ``true``.
  63. - **PARAM_LIMIT_LOWER** = **2** --- The minimum rotation. Only active if :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` is ``true``.
  64. - **PARAM_LIMIT_BIAS** = **3** --- The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
  65. - **PARAM_LIMIT_SOFTNESS** = **4**
  66. - **PARAM_LIMIT_RELAXATION** = **5** --- The lower this value, the more the rotation gets slowed down.
  67. - **PARAM_MOTOR_TARGET_VELOCITY** = **6** --- Target speed for the motor.
  68. - **PARAM_MOTOR_MAX_IMPULSE** = **7** --- Maximum acceleration for the motor.
  69. - **PARAM_MAX** = **8** --- Represents the size of the :ref:`Param<enum_HingeJoint3D_Param>` enum.
  70. ----
  71. .. _enum_HingeJoint3D_Flag:
  72. .. _class_HingeJoint3D_constant_FLAG_USE_LIMIT:
  73. .. _class_HingeJoint3D_constant_FLAG_ENABLE_MOTOR:
  74. .. _class_HingeJoint3D_constant_FLAG_MAX:
  75. enum **Flag**:
  76. - **FLAG_USE_LIMIT** = **0** --- If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_limit/lower<class_HingeJoint3D_property_angular_limit/lower>` and :ref:`angular_limit/upper<class_HingeJoint3D_property_angular_limit/upper>` has effects.
  77. - **FLAG_ENABLE_MOTOR** = **1** --- When activated, a motor turns the hinge.
  78. - **FLAG_MAX** = **2** --- Represents the size of the :ref:`Flag<enum_HingeJoint3D_Flag>` enum.
  79. Property Descriptions
  80. ---------------------
  81. .. _class_HingeJoint3D_property_angular_limit/bias:
  82. - :ref:`float<class_float>` **angular_limit/bias**
  83. +-----------+------------------+
  84. | *Default* | ``0.3`` |
  85. +-----------+------------------+
  86. | *Setter* | set_param(value) |
  87. +-----------+------------------+
  88. | *Getter* | get_param() |
  89. +-----------+------------------+
  90. The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
  91. ----
  92. .. _class_HingeJoint3D_property_angular_limit/enable:
  93. - :ref:`bool<class_bool>` **angular_limit/enable**
  94. +-----------+-----------------+
  95. | *Default* | ``false`` |
  96. +-----------+-----------------+
  97. | *Setter* | set_flag(value) |
  98. +-----------+-----------------+
  99. | *Getter* | get_flag() |
  100. +-----------+-----------------+
  101. If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_limit/lower<class_HingeJoint3D_property_angular_limit/lower>` and :ref:`angular_limit/upper<class_HingeJoint3D_property_angular_limit/upper>` has effects.
  102. ----
  103. .. _class_HingeJoint3D_property_angular_limit/lower:
  104. - :ref:`float<class_float>` **angular_limit/lower**
  105. +-----------+-----------+
  106. | *Default* | ``-90.0`` |
  107. +-----------+-----------+
  108. The minimum rotation. Only active if :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` is ``true``.
  109. ----
  110. .. _class_HingeJoint3D_property_angular_limit/relaxation:
  111. - :ref:`float<class_float>` **angular_limit/relaxation**
  112. +-----------+------------------+
  113. | *Default* | ``1.0`` |
  114. +-----------+------------------+
  115. | *Setter* | set_param(value) |
  116. +-----------+------------------+
  117. | *Getter* | get_param() |
  118. +-----------+------------------+
  119. The lower this value, the more the rotation gets slowed down.
  120. ----
  121. .. _class_HingeJoint3D_property_angular_limit/softness:
  122. - :ref:`float<class_float>` **angular_limit/softness**
  123. +-----------+------------------+
  124. | *Default* | ``0.9`` |
  125. +-----------+------------------+
  126. | *Setter* | set_param(value) |
  127. +-----------+------------------+
  128. | *Getter* | get_param() |
  129. +-----------+------------------+
  130. ----
  131. .. _class_HingeJoint3D_property_angular_limit/upper:
  132. - :ref:`float<class_float>` **angular_limit/upper**
  133. +-----------+----------+
  134. | *Default* | ``90.0`` |
  135. +-----------+----------+
  136. The maximum rotation. Only active if :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` is ``true``.
  137. ----
  138. .. _class_HingeJoint3D_property_motor/enable:
  139. - :ref:`bool<class_bool>` **motor/enable**
  140. +-----------+-----------------+
  141. | *Default* | ``false`` |
  142. +-----------+-----------------+
  143. | *Setter* | set_flag(value) |
  144. +-----------+-----------------+
  145. | *Getter* | get_flag() |
  146. +-----------+-----------------+
  147. When activated, a motor turns the hinge.
  148. ----
  149. .. _class_HingeJoint3D_property_motor/max_impulse:
  150. - :ref:`float<class_float>` **motor/max_impulse**
  151. +-----------+------------------+
  152. | *Default* | ``1.0`` |
  153. +-----------+------------------+
  154. | *Setter* | set_param(value) |
  155. +-----------+------------------+
  156. | *Getter* | get_param() |
  157. +-----------+------------------+
  158. Maximum acceleration for the motor.
  159. ----
  160. .. _class_HingeJoint3D_property_motor/target_velocity:
  161. - :ref:`float<class_float>` **motor/target_velocity**
  162. +-----------+------------------+
  163. | *Default* | ``1.0`` |
  164. +-----------+------------------+
  165. | *Setter* | set_param(value) |
  166. +-----------+------------------+
  167. | *Getter* | get_param() |
  168. +-----------+------------------+
  169. Target speed for the motor.
  170. ----
  171. .. _class_HingeJoint3D_property_params/bias:
  172. - :ref:`float<class_float>` **params/bias**
  173. +-----------+------------------+
  174. | *Default* | ``0.3`` |
  175. +-----------+------------------+
  176. | *Setter* | set_param(value) |
  177. +-----------+------------------+
  178. | *Getter* | get_param() |
  179. +-----------+------------------+
  180. The speed with which the two bodies get pulled together when they move in different directions.
  181. Method Descriptions
  182. -------------------
  183. .. _class_HingeJoint3D_method_get_flag:
  184. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag **)** |const|
  185. Returns the value of the specified flag.
  186. ----
  187. .. _class_HingeJoint3D_method_get_param:
  188. - :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const|
  189. Returns the value of the specified parameter.
  190. ----
  191. .. _class_HingeJoint3D_method_set_flag:
  192. - void **set_flag** **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag, :ref:`bool<class_bool>` enabled **)**
  193. If ``true``, enables the specified flag.
  194. ----
  195. .. _class_HingeJoint3D_method_set_param:
  196. - void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)**
  197. Sets the value of the specified parameter.
  198. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  199. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  200. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  201. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  202. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  203. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`