class_hingejoint.rst 8.2 KB

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