class_hingejoint.rst 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the HingeJoint.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_HingeJoint:
  6. HingeJoint
  7. ==========
  8. **Inherits:** :ref:`Joint<class_Joint>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. A hinge between two 3D bodies.
  13. Properties
  14. ----------
  15. +---------------------------+-------------------------------------------------------------------------------------+
  16. | :ref:`float<class_float>` | :ref:`angular_limit/bias<class_HingeJoint_property_angular_limit/bias>` |
  17. +---------------------------+-------------------------------------------------------------------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`angular_limit/enable<class_HingeJoint_property_angular_limit/enable>` |
  19. +---------------------------+-------------------------------------------------------------------------------------+
  20. | :ref:`float<class_float>` | :ref:`angular_limit/lower<class_HingeJoint_property_angular_limit/lower>` |
  21. +---------------------------+-------------------------------------------------------------------------------------+
  22. | :ref:`float<class_float>` | :ref:`angular_limit/relaxation<class_HingeJoint_property_angular_limit/relaxation>` |
  23. +---------------------------+-------------------------------------------------------------------------------------+
  24. | :ref:`float<class_float>` | :ref:`angular_limit/softness<class_HingeJoint_property_angular_limit/softness>` |
  25. +---------------------------+-------------------------------------------------------------------------------------+
  26. | :ref:`float<class_float>` | :ref:`angular_limit/upper<class_HingeJoint_property_angular_limit/upper>` |
  27. +---------------------------+-------------------------------------------------------------------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`motor/enable<class_HingeJoint_property_motor/enable>` |
  29. +---------------------------+-------------------------------------------------------------------------------------+
  30. | :ref:`float<class_float>` | :ref:`motor/max_impulse<class_HingeJoint_property_motor/max_impulse>` |
  31. +---------------------------+-------------------------------------------------------------------------------------+
  32. | :ref:`float<class_float>` | :ref:`motor/target_velocity<class_HingeJoint_property_motor/target_velocity>` |
  33. +---------------------------+-------------------------------------------------------------------------------------+
  34. | :ref:`float<class_float>` | :ref:`params/bias<class_HingeJoint_property_params/bias>` |
  35. +---------------------------+-------------------------------------------------------------------------------------+
  36. Enumerations
  37. ------------
  38. .. _enum_HingeJoint_Param:
  39. .. _class_HingeJoint_constant_PARAM_BIAS:
  40. .. _class_HingeJoint_constant_PARAM_LIMIT_UPPER:
  41. .. _class_HingeJoint_constant_PARAM_LIMIT_LOWER:
  42. .. _class_HingeJoint_constant_PARAM_LIMIT_BIAS:
  43. .. _class_HingeJoint_constant_PARAM_LIMIT_SOFTNESS:
  44. .. _class_HingeJoint_constant_PARAM_LIMIT_RELAXATION:
  45. .. _class_HingeJoint_constant_PARAM_MOTOR_TARGET_VELOCITY:
  46. .. _class_HingeJoint_constant_PARAM_MOTOR_MAX_IMPULSE:
  47. .. _class_HingeJoint_constant_PARAM_MAX:
  48. enum **Param**:
  49. - **PARAM_BIAS** = **0** --- The speed with which the two bodies get pulled together when they move in different directions.
  50. - **PARAM_LIMIT_UPPER** = **1** --- The maximum rotation. only active if :ref:`angular_limit/enable<class_HingeJoint_property_angular_limit/enable>` is ``true``.
  51. - **PARAM_LIMIT_LOWER** = **2** --- The minimum rotation. only active if :ref:`angular_limit/enable<class_HingeJoint_property_angular_limit/enable>` is ``true``.
  52. - **PARAM_LIMIT_BIAS** = **3** --- The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
  53. - **PARAM_LIMIT_SOFTNESS** = **4**
  54. - **PARAM_LIMIT_RELAXATION** = **5** --- The lower this value, the more the rotation gets slowed down.
  55. - **PARAM_MOTOR_TARGET_VELOCITY** = **6** --- Target speed for the motor.
  56. - **PARAM_MOTOR_MAX_IMPULSE** = **7** --- Maximum acceleration for the motor.
  57. - **PARAM_MAX** = **8** --- Represents the size of the :ref:`Param<enum_HingeJoint_Param>` enum.
  58. ----
  59. .. _enum_HingeJoint_Flag:
  60. .. _class_HingeJoint_constant_FLAG_USE_LIMIT:
  61. .. _class_HingeJoint_constant_FLAG_ENABLE_MOTOR:
  62. .. _class_HingeJoint_constant_FLAG_MAX:
  63. enum **Flag**:
  64. - **FLAG_USE_LIMIT** = **0** --- If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_limit/lower<class_HingeJoint_property_angular_limit/lower>` and :ref:`angular_limit/upper<class_HingeJoint_property_angular_limit/upper>` has effects.
  65. - **FLAG_ENABLE_MOTOR** = **1** --- When activated, a motor turns the hinge.
  66. - **FLAG_MAX** = **2** --- Represents the size of the :ref:`Flag<enum_HingeJoint_Flag>` enum.
  67. Description
  68. -----------
  69. Normally uses the z-axis of body A as the hinge axis, another axis can be specified when adding it manually though.
  70. Property Descriptions
  71. ---------------------
  72. .. _class_HingeJoint_property_angular_limit/bias:
  73. - :ref:`float<class_float>` **angular_limit/bias**
  74. +----------+------------------+
  75. | *Setter* | set_param(value) |
  76. +----------+------------------+
  77. | *Getter* | get_param() |
  78. +----------+------------------+
  79. The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
  80. ----
  81. .. _class_HingeJoint_property_angular_limit/enable:
  82. - :ref:`bool<class_bool>` **angular_limit/enable**
  83. +----------+-----------------+
  84. | *Setter* | set_flag(value) |
  85. +----------+-----------------+
  86. | *Getter* | get_flag() |
  87. +----------+-----------------+
  88. If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_limit/lower<class_HingeJoint_property_angular_limit/lower>` and :ref:`angular_limit/upper<class_HingeJoint_property_angular_limit/upper>` has effects.
  89. ----
  90. .. _class_HingeJoint_property_angular_limit/lower:
  91. - :ref:`float<class_float>` **angular_limit/lower**
  92. The minimum rotation. only active if :ref:`angular_limit/enable<class_HingeJoint_property_angular_limit/enable>` is ``true``.
  93. ----
  94. .. _class_HingeJoint_property_angular_limit/relaxation:
  95. - :ref:`float<class_float>` **angular_limit/relaxation**
  96. +----------+------------------+
  97. | *Setter* | set_param(value) |
  98. +----------+------------------+
  99. | *Getter* | get_param() |
  100. +----------+------------------+
  101. The lower this value, the more the rotation gets slowed down.
  102. ----
  103. .. _class_HingeJoint_property_angular_limit/softness:
  104. - :ref:`float<class_float>` **angular_limit/softness**
  105. +----------+------------------+
  106. | *Setter* | set_param(value) |
  107. +----------+------------------+
  108. | *Getter* | get_param() |
  109. +----------+------------------+
  110. ----
  111. .. _class_HingeJoint_property_angular_limit/upper:
  112. - :ref:`float<class_float>` **angular_limit/upper**
  113. The maximum rotation. only active if :ref:`angular_limit/enable<class_HingeJoint_property_angular_limit/enable>` is ``true``.
  114. ----
  115. .. _class_HingeJoint_property_motor/enable:
  116. - :ref:`bool<class_bool>` **motor/enable**
  117. +----------+-----------------+
  118. | *Setter* | set_flag(value) |
  119. +----------+-----------------+
  120. | *Getter* | get_flag() |
  121. +----------+-----------------+
  122. When activated, a motor turns the hinge.
  123. ----
  124. .. _class_HingeJoint_property_motor/max_impulse:
  125. - :ref:`float<class_float>` **motor/max_impulse**
  126. +----------+------------------+
  127. | *Setter* | set_param(value) |
  128. +----------+------------------+
  129. | *Getter* | get_param() |
  130. +----------+------------------+
  131. Maximum acceleration for the motor.
  132. ----
  133. .. _class_HingeJoint_property_motor/target_velocity:
  134. - :ref:`float<class_float>` **motor/target_velocity**
  135. +----------+------------------+
  136. | *Setter* | set_param(value) |
  137. +----------+------------------+
  138. | *Getter* | get_param() |
  139. +----------+------------------+
  140. Target speed for the motor.
  141. ----
  142. .. _class_HingeJoint_property_params/bias:
  143. - :ref:`float<class_float>` **params/bias**
  144. +----------+------------------+
  145. | *Setter* | set_param(value) |
  146. +----------+------------------+
  147. | *Getter* | get_param() |
  148. +----------+------------------+
  149. The speed with which the two bodies get pulled together when they move in different directions.