class_pinjoint.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the PinJoint.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_PinJoint:
  6. PinJoint
  7. ========
  8. **Inherits:** :ref:`Joint<class_Joint>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Pin joint for 3D PhysicsBodies.
  10. Description
  11. -----------
  12. Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. See also :ref:`Generic6DOFJoint<class_Generic6DOFJoint>`.
  13. Properties
  14. ----------
  15. +---------------------------+---------------------------------------------------------------------------+---------+
  16. | :ref:`float<class_float>` | :ref:`params/bias<class_PinJoint_property_params/bias>` | ``0.3`` |
  17. +---------------------------+---------------------------------------------------------------------------+---------+
  18. | :ref:`float<class_float>` | :ref:`params/damping<class_PinJoint_property_params/damping>` | ``1.0`` |
  19. +---------------------------+---------------------------------------------------------------------------+---------+
  20. | :ref:`float<class_float>` | :ref:`params/impulse_clamp<class_PinJoint_property_params/impulse_clamp>` | ``0.0`` |
  21. +---------------------------+---------------------------------------------------------------------------+---------+
  22. Methods
  23. -------
  24. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`get_param<class_PinJoint_method_get_param>` **(** :ref:`Param<enum_PinJoint_Param>` param **)** |const| |
  26. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`set_param<class_PinJoint_method_set_param>` **(** :ref:`Param<enum_PinJoint_Param>` param, :ref:`float<class_float>` value **)** |
  28. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
  29. Enumerations
  30. ------------
  31. .. _enum_PinJoint_Param:
  32. .. _class_PinJoint_constant_PARAM_BIAS:
  33. .. _class_PinJoint_constant_PARAM_DAMPING:
  34. .. _class_PinJoint_constant_PARAM_IMPULSE_CLAMP:
  35. enum **Param**:
  36. - **PARAM_BIAS** = **0** --- The force with which the pinned objects stay in positional relation to each other. The higher, the stronger.
  37. - **PARAM_DAMPING** = **1** --- The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger.
  38. - **PARAM_IMPULSE_CLAMP** = **2** --- If above 0, this value is the maximum value for an impulse that this Joint produces.
  39. Property Descriptions
  40. ---------------------
  41. .. _class_PinJoint_property_params/bias:
  42. - :ref:`float<class_float>` **params/bias**
  43. +-----------+------------------+
  44. | *Default* | ``0.3`` |
  45. +-----------+------------------+
  46. | *Setter* | set_param(value) |
  47. +-----------+------------------+
  48. | *Getter* | get_param() |
  49. +-----------+------------------+
  50. The force with which the pinned objects stay in positional relation to each other. The higher, the stronger.
  51. ----
  52. .. _class_PinJoint_property_params/damping:
  53. - :ref:`float<class_float>` **params/damping**
  54. +-----------+------------------+
  55. | *Default* | ``1.0`` |
  56. +-----------+------------------+
  57. | *Setter* | set_param(value) |
  58. +-----------+------------------+
  59. | *Getter* | get_param() |
  60. +-----------+------------------+
  61. The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger.
  62. ----
  63. .. _class_PinJoint_property_params/impulse_clamp:
  64. - :ref:`float<class_float>` **params/impulse_clamp**
  65. +-----------+------------------+
  66. | *Default* | ``0.0`` |
  67. +-----------+------------------+
  68. | *Setter* | set_param(value) |
  69. +-----------+------------------+
  70. | *Getter* | get_param() |
  71. +-----------+------------------+
  72. If above 0, this value is the maximum value for an impulse that this Joint produces.
  73. Method Descriptions
  74. -------------------
  75. .. _class_PinJoint_method_get_param:
  76. - :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_PinJoint_Param>` param **)** |const|
  77. Returns the value of the specified parameter.
  78. ----
  79. .. _class_PinJoint_method_set_param:
  80. - void **set_param** **(** :ref:`Param<enum_PinJoint_Param>` param, :ref:`float<class_float>` value **)**
  81. Sets the value of the specified parameter.
  82. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  83. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  84. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`