class_generic6dofjoint.rst 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Generic6DOFJoint.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Generic6DOFJoint:
  5. Generic6DOFJoint
  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. The generic 6 degrees of freedom joint can implement a variety of joint-types by locking certain axes' rotation or translation.
  12. Member Functions
  13. ----------------
  14. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`get_flag_x<class_Generic6DOFJoint_get_flag_x>` **(** :ref:`int<class_int>` flag **)** const |
  16. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`get_flag_y<class_Generic6DOFJoint_get_flag_y>` **(** :ref:`int<class_int>` flag **)** const |
  18. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`get_flag_z<class_Generic6DOFJoint_get_flag_z>` **(** :ref:`int<class_int>` flag **)** const |
  20. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`float<class_float>` | :ref:`get_param_x<class_Generic6DOFJoint_get_param_x>` **(** :ref:`int<class_int>` param **)** const |
  22. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`get_param_y<class_Generic6DOFJoint_get_param_y>` **(** :ref:`int<class_int>` param **)** const |
  24. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`get_param_z<class_Generic6DOFJoint_get_param_z>` **(** :ref:`int<class_int>` param **)** const |
  26. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`set_flag_x<class_Generic6DOFJoint_set_flag_x>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)** |
  28. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_flag_y<class_Generic6DOFJoint_set_flag_y>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)** |
  30. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_flag_z<class_Generic6DOFJoint_set_flag_z>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)** |
  32. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_param_x<class_Generic6DOFJoint_set_param_x>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
  34. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_param_y<class_Generic6DOFJoint_set_param_y>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
  36. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_param_z<class_Generic6DOFJoint_set_param_z>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
  38. +----------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  39. Member Variables
  40. ----------------
  41. - :ref:`float<class_float>` **angular_limit_x/damping** - The amount of rotational damping across the x-axis.
  42. The lower, the longer an impulse from one side takes to travel to the other side.
  43. - :ref:`bool<class_bool>` **angular_limit_x/enabled** - If ``true`` rotation across the x-axis is enabled.
  44. - :ref:`float<class_float>` **angular_limit_x/erp** - When rotating across x-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
  45. - :ref:`float<class_float>` **angular_limit_x/force_limit** - The maximum amount of force that can occur, when rotating arround x-axis.
  46. - :ref:`float<class_float>` **angular_limit_x/lower_angle** - The minimum rotation in negative direction to break loose and rotate arround the x-axis.
  47. - :ref:`float<class_float>` **angular_limit_x/restitution** - The amount of rotational restitution across the x-axis. The lower, the more restitution occurs.
  48. - :ref:`float<class_float>` **angular_limit_x/softness** - The speed of all rotations across the x-axis.
  49. - :ref:`float<class_float>` **angular_limit_x/upper_angle** - The minimum rotation in positive direction to break loose and rotate arround the x-axis.
  50. - :ref:`float<class_float>` **angular_limit_y/damping** - The amount of rotational damping across the y-axis. The lower, the more dampening occurs.
  51. - :ref:`bool<class_bool>` **angular_limit_y/enabled** - If ``true`` rotation across the y-axis is enabled.
  52. - :ref:`float<class_float>` **angular_limit_y/erp** - When rotating across y-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
  53. - :ref:`float<class_float>` **angular_limit_y/force_limit** - The maximum amount of force that can occur, when rotating arround y-axis.
  54. - :ref:`float<class_float>` **angular_limit_y/lower_angle** - The minimum rotation in negative direction to break loose and rotate arround the y-axis.
  55. - :ref:`float<class_float>` **angular_limit_y/restitution** - The amount of rotational restitution across the y-axis. The lower, the more restitution occurs.
  56. - :ref:`float<class_float>` **angular_limit_y/softness** - The speed of all rotations across the y-axis.
  57. - :ref:`float<class_float>` **angular_limit_y/upper_angle** - The minimum rotation in positive direction to break loose and rotate arround the y-axis.
  58. - :ref:`float<class_float>` **angular_limit_z/damping** - The amount of rotational damping across the z-axis. The lower, the more dampening occurs.
  59. - :ref:`bool<class_bool>` **angular_limit_z/enabled** - If ``true`` rotation across the z-axis is enabled.
  60. - :ref:`float<class_float>` **angular_limit_z/erp** - When rotating across z-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
  61. - :ref:`float<class_float>` **angular_limit_z/force_limit** - The maximum amount of force that can occur, when rotating arround z-axis.
  62. - :ref:`float<class_float>` **angular_limit_z/lower_angle** - The minimum rotation in negative direction to break loose and rotate arround the z-axis.
  63. - :ref:`float<class_float>` **angular_limit_z/restitution** - The amount of rotational restitution across the z-axis. The lower, the more restitution occurs.
  64. - :ref:`float<class_float>` **angular_limit_z/softness** - The speed of all rotations across the z-axis.
  65. - :ref:`float<class_float>` **angular_limit_z/upper_angle** - The minimum rotation in positive direction to break loose and rotate arround the z-axis.
  66. - :ref:`bool<class_bool>` **angular_motor_x/enabled** - If ``true`` a rotating motor at the x-axis is enabled.
  67. - :ref:`float<class_float>` **angular_motor_x/force_limit** - Maximum acceleration for the motor at the x-axis.
  68. - :ref:`float<class_float>` **angular_motor_x/target_velocity** - Target speed for the motor at the x-axis.
  69. - :ref:`bool<class_bool>` **angular_motor_y/enabled** - If ``true`` a rotating motor at the y-axis is enabled.
  70. - :ref:`float<class_float>` **angular_motor_y/force_limit** - Maximum acceleration for the motor at the y-axis.
  71. - :ref:`float<class_float>` **angular_motor_y/target_velocity** - Target speed for the motor at the y-axis.
  72. - :ref:`bool<class_bool>` **angular_motor_z/enabled** - If ``true`` a rotating motor at the z-axis is enabled.
  73. - :ref:`float<class_float>` **angular_motor_z/force_limit** - Maximum acceleration for the motor at the z-axis.
  74. - :ref:`float<class_float>` **angular_motor_z/target_velocity** - Target speed for the motor at the z-axis.
  75. - :ref:`float<class_float>` **linear_limit_x/damping** - The amount of damping that happens at the x-motion.
  76. - :ref:`bool<class_bool>` **linear_limit_x/enabled** - If ``true`` the linear motion across the x-axis is enabled.
  77. - :ref:`float<class_float>` **linear_limit_x/lower_distance** - The minimum difference between the pivot points' x-axis.
  78. - :ref:`float<class_float>` **linear_limit_x/restitution** - The amount of restitution on the x-axis movement The lower, the more momentum gets lost.
  79. - :ref:`float<class_float>` **linear_limit_x/softness** - A factor applied to the movement across the x-axis The lower, the slower the movement.
  80. - :ref:`float<class_float>` **linear_limit_x/upper_distance** - The maximum difference between the pivot points' x-axis.
  81. - :ref:`float<class_float>` **linear_limit_y/damping** - The amount of damping that happens at the y-motion.
  82. - :ref:`bool<class_bool>` **linear_limit_y/enabled** - If ``true`` the linear motion across the y-axis is enabled.
  83. - :ref:`float<class_float>` **linear_limit_y/lower_distance** - The minimum difference between the pivot points' y-axis.
  84. - :ref:`float<class_float>` **linear_limit_y/restitution** - The amount of restitution on the y-axis movement The lower, the more momentum gets lost.
  85. - :ref:`float<class_float>` **linear_limit_y/softness** - A factor applied to the movement across the y-axis The lower, the slower the movement.
  86. - :ref:`float<class_float>` **linear_limit_y/upper_distance** - The maximum difference between the pivot points' y-axis.
  87. - :ref:`float<class_float>` **linear_limit_z/damping** - The amount of damping that happens at the z-motion.
  88. - :ref:`bool<class_bool>` **linear_limit_z/enabled** - If ``true`` the linear motion across the z-axis is enabled.
  89. - :ref:`float<class_float>` **linear_limit_z/lower_distance** - The minimum difference between the pivot points' z-axis.
  90. - :ref:`float<class_float>` **linear_limit_z/restitution** - The amount of restitution on the z-axis movement The lower, the more momentum gets lost.
  91. - :ref:`float<class_float>` **linear_limit_z/softness** - A factor applied to the movement across the z-axis The lower, the slower the movement.
  92. - :ref:`float<class_float>` **linear_limit_z/upper_distance** - The maximum difference between the pivot points' z-axis.
  93. Numeric Constants
  94. -----------------
  95. - **PARAM_LINEAR_LOWER_LIMIT** = **0** --- The minimum difference between the pivot points' axes.
  96. - **PARAM_LINEAR_UPPER_LIMIT** = **1** --- The maximum difference between the pivot points' axes.
  97. - **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the axes The lower, the slower the movement.
  98. - **PARAM_LINEAR_RESTITUTION** = **3** --- The amount of restitution on the axes movement The lower, the more momentum gets lost.
  99. - **PARAM_LINEAR_DAMPING** = **4** --- The amount of damping that happens at the linear motion across the axes.
  100. - **PARAM_ANGULAR_LOWER_LIMIT** = **5** --- The minimum rotation in negative direction to break loose and rotate arround the axes.
  101. - **PARAM_ANGULAR_UPPER_LIMIT** = **6** --- The minimum rotation in positive direction to break loose and rotate arround the axes.
  102. - **PARAM_ANGULAR_LIMIT_SOFTNESS** = **7** --- The speed of all rotations across the axes.
  103. - **PARAM_ANGULAR_DAMPING** = **8** --- The amount of rotational damping across the axes. The lower, the more dampening occurs.
  104. - **PARAM_ANGULAR_RESTITUTION** = **9** --- The amount of rotational restitution across the axes. The lower, the more restitution occurs.
  105. - **PARAM_ANGULAR_FORCE_LIMIT** = **10** --- The maximum amount of force that can occur, when rotating arround the axes.
  106. - **PARAM_ANGULAR_ERP** = **11** --- When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower.
  107. - **PARAM_ANGULAR_MOTOR_TARGET_VELOCITY** = **12** --- Target speed for the motor at the axes.
  108. - **PARAM_ANGULAR_MOTOR_FORCE_LIMIT** = **13** --- Maximum acceleration for the motor at the axes.
  109. - **PARAM_MAX** = **14** --- End flag of PARAM\_\* constants, used internally.
  110. - **FLAG_ENABLE_LINEAR_LIMIT** = **0** --- If ``set`` there is linear motion possible within the given limits.
  111. - **FLAG_ENABLE_ANGULAR_LIMIT** = **1** --- If ``set`` there is rotational motion possible.
  112. - **FLAG_ENABLE_MOTOR** = **2** --- If ``set`` there is a rotational motor across these axes.
  113. - **FLAG_MAX** = **3** --- End flag of FLAG\_\* constants, used internally.
  114. Description
  115. -----------
  116. The first 3 dof axes are linear axes, which represent translation of Bodies, and the latter 3 dof axes represent the angular motion. Each axis can be either locked, or limited.
  117. Member Function Description
  118. ---------------------------
  119. .. _class_Generic6DOFJoint_get_flag_x:
  120. - :ref:`bool<class_bool>` **get_flag_x** **(** :ref:`int<class_int>` flag **)** const
  121. .. _class_Generic6DOFJoint_get_flag_y:
  122. - :ref:`bool<class_bool>` **get_flag_y** **(** :ref:`int<class_int>` flag **)** const
  123. .. _class_Generic6DOFJoint_get_flag_z:
  124. - :ref:`bool<class_bool>` **get_flag_z** **(** :ref:`int<class_int>` flag **)** const
  125. .. _class_Generic6DOFJoint_get_param_x:
  126. - :ref:`float<class_float>` **get_param_x** **(** :ref:`int<class_int>` param **)** const
  127. .. _class_Generic6DOFJoint_get_param_y:
  128. - :ref:`float<class_float>` **get_param_y** **(** :ref:`int<class_int>` param **)** const
  129. .. _class_Generic6DOFJoint_get_param_z:
  130. - :ref:`float<class_float>` **get_param_z** **(** :ref:`int<class_int>` param **)** const
  131. .. _class_Generic6DOFJoint_set_flag_x:
  132. - void **set_flag_x** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)**
  133. .. _class_Generic6DOFJoint_set_flag_y:
  134. - void **set_flag_y** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)**
  135. .. _class_Generic6DOFJoint_set_flag_z:
  136. - void **set_flag_z** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` value **)**
  137. .. _class_Generic6DOFJoint_set_param_x:
  138. - void **set_param_x** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
  139. .. _class_Generic6DOFJoint_set_param_y:
  140. - void **set_param_y** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
  141. .. _class_Generic6DOFJoint_set_param_z:
  142. - void **set_param_z** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**