class_sliderjoint.rst 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  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 SliderJoint.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_SliderJoint:
  6. SliderJoint
  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. Piston kind of slider between two bodies in 3D.
  13. Properties
  14. ----------
  15. +---------------------------+--------------------------------------------------------------------------------------------+------+
  16. | :ref:`float<class_float>` | :ref:`angular_limit/damping<class_SliderJoint_property_angular_limit/damping>` | 0.0 |
  17. +---------------------------+--------------------------------------------------------------------------------------------+------+
  18. | :ref:`float<class_float>` | :ref:`angular_limit/lower_angle<class_SliderJoint_property_angular_limit/lower_angle>` | 0.0 |
  19. +---------------------------+--------------------------------------------------------------------------------------------+------+
  20. | :ref:`float<class_float>` | :ref:`angular_limit/restitution<class_SliderJoint_property_angular_limit/restitution>` | 0.7 |
  21. +---------------------------+--------------------------------------------------------------------------------------------+------+
  22. | :ref:`float<class_float>` | :ref:`angular_limit/softness<class_SliderJoint_property_angular_limit/softness>` | 1.0 |
  23. +---------------------------+--------------------------------------------------------------------------------------------+------+
  24. | :ref:`float<class_float>` | :ref:`angular_limit/upper_angle<class_SliderJoint_property_angular_limit/upper_angle>` | 0.0 |
  25. +---------------------------+--------------------------------------------------------------------------------------------+------+
  26. | :ref:`float<class_float>` | :ref:`angular_motion/damping<class_SliderJoint_property_angular_motion/damping>` | 1.0 |
  27. +---------------------------+--------------------------------------------------------------------------------------------+------+
  28. | :ref:`float<class_float>` | :ref:`angular_motion/restitution<class_SliderJoint_property_angular_motion/restitution>` | 0.7 |
  29. +---------------------------+--------------------------------------------------------------------------------------------+------+
  30. | :ref:`float<class_float>` | :ref:`angular_motion/softness<class_SliderJoint_property_angular_motion/softness>` | 1.0 |
  31. +---------------------------+--------------------------------------------------------------------------------------------+------+
  32. | :ref:`float<class_float>` | :ref:`angular_ortho/damping<class_SliderJoint_property_angular_ortho/damping>` | 1.0 |
  33. +---------------------------+--------------------------------------------------------------------------------------------+------+
  34. | :ref:`float<class_float>` | :ref:`angular_ortho/restitution<class_SliderJoint_property_angular_ortho/restitution>` | 0.7 |
  35. +---------------------------+--------------------------------------------------------------------------------------------+------+
  36. | :ref:`float<class_float>` | :ref:`angular_ortho/softness<class_SliderJoint_property_angular_ortho/softness>` | 1.0 |
  37. +---------------------------+--------------------------------------------------------------------------------------------+------+
  38. | :ref:`float<class_float>` | :ref:`linear_limit/damping<class_SliderJoint_property_linear_limit/damping>` | 1.0 |
  39. +---------------------------+--------------------------------------------------------------------------------------------+------+
  40. | :ref:`float<class_float>` | :ref:`linear_limit/lower_distance<class_SliderJoint_property_linear_limit/lower_distance>` | -1.0 |
  41. +---------------------------+--------------------------------------------------------------------------------------------+------+
  42. | :ref:`float<class_float>` | :ref:`linear_limit/restitution<class_SliderJoint_property_linear_limit/restitution>` | 0.7 |
  43. +---------------------------+--------------------------------------------------------------------------------------------+------+
  44. | :ref:`float<class_float>` | :ref:`linear_limit/softness<class_SliderJoint_property_linear_limit/softness>` | 1.0 |
  45. +---------------------------+--------------------------------------------------------------------------------------------+------+
  46. | :ref:`float<class_float>` | :ref:`linear_limit/upper_distance<class_SliderJoint_property_linear_limit/upper_distance>` | 1.0 |
  47. +---------------------------+--------------------------------------------------------------------------------------------+------+
  48. | :ref:`float<class_float>` | :ref:`linear_motion/damping<class_SliderJoint_property_linear_motion/damping>` | 0.0 |
  49. +---------------------------+--------------------------------------------------------------------------------------------+------+
  50. | :ref:`float<class_float>` | :ref:`linear_motion/restitution<class_SliderJoint_property_linear_motion/restitution>` | 0.7 |
  51. +---------------------------+--------------------------------------------------------------------------------------------+------+
  52. | :ref:`float<class_float>` | :ref:`linear_motion/softness<class_SliderJoint_property_linear_motion/softness>` | 1.0 |
  53. +---------------------------+--------------------------------------------------------------------------------------------+------+
  54. | :ref:`float<class_float>` | :ref:`linear_ortho/damping<class_SliderJoint_property_linear_ortho/damping>` | 1.0 |
  55. +---------------------------+--------------------------------------------------------------------------------------------+------+
  56. | :ref:`float<class_float>` | :ref:`linear_ortho/restitution<class_SliderJoint_property_linear_ortho/restitution>` | 0.7 |
  57. +---------------------------+--------------------------------------------------------------------------------------------+------+
  58. | :ref:`float<class_float>` | :ref:`linear_ortho/softness<class_SliderJoint_property_linear_ortho/softness>` | 1.0 |
  59. +---------------------------+--------------------------------------------------------------------------------------------+------+
  60. Methods
  61. -------
  62. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`float<class_float>` | :ref:`get_param<class_SliderJoint_method_get_param>` **(** :ref:`Param<enum_SliderJoint_Param>` param **)** const |
  64. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  65. | void | :ref:`set_param<class_SliderJoint_method_set_param>` **(** :ref:`Param<enum_SliderJoint_Param>` param, :ref:`float<class_float>` value **)** |
  66. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
  67. Enumerations
  68. ------------
  69. .. _enum_SliderJoint_Param:
  70. .. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_UPPER:
  71. .. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_LOWER:
  72. .. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_SOFTNESS:
  73. .. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_RESTITUTION:
  74. .. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_DAMPING:
  75. .. _class_SliderJoint_constant_PARAM_LINEAR_MOTION_SOFTNESS:
  76. .. _class_SliderJoint_constant_PARAM_LINEAR_MOTION_RESTITUTION:
  77. .. _class_SliderJoint_constant_PARAM_LINEAR_MOTION_DAMPING:
  78. .. _class_SliderJoint_constant_PARAM_LINEAR_ORTHOGONAL_SOFTNESS:
  79. .. _class_SliderJoint_constant_PARAM_LINEAR_ORTHOGONAL_RESTITUTION:
  80. .. _class_SliderJoint_constant_PARAM_LINEAR_ORTHOGONAL_DAMPING:
  81. .. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_UPPER:
  82. .. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_LOWER:
  83. .. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_SOFTNESS:
  84. .. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_RESTITUTION:
  85. .. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_DAMPING:
  86. .. _class_SliderJoint_constant_PARAM_ANGULAR_MOTION_SOFTNESS:
  87. .. _class_SliderJoint_constant_PARAM_ANGULAR_MOTION_RESTITUTION:
  88. .. _class_SliderJoint_constant_PARAM_ANGULAR_MOTION_DAMPING:
  89. .. _class_SliderJoint_constant_PARAM_ANGULAR_ORTHOGONAL_SOFTNESS:
  90. .. _class_SliderJoint_constant_PARAM_ANGULAR_ORTHOGONAL_RESTITUTION:
  91. .. _class_SliderJoint_constant_PARAM_ANGULAR_ORTHOGONAL_DAMPING:
  92. .. _class_SliderJoint_constant_PARAM_MAX:
  93. enum **Param**:
  94. - **PARAM_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their X axis before damping happens.
  95. - **PARAM_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their X axis before damping happens.
  96. - **PARAM_LINEAR_LIMIT_SOFTNESS** = **2** --- A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement.
  97. - **PARAM_LINEAR_LIMIT_RESTITUTION** = **3** --- The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost.
  98. - **PARAM_LINEAR_LIMIT_DAMPING** = **4** --- The amount of damping once the slider limits are surpassed.
  99. - **PARAM_LINEAR_MOTION_SOFTNESS** = **5** --- A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement.
  100. - **PARAM_LINEAR_MOTION_RESTITUTION** = **6** --- The amount of restitution inside the slider limits.
  101. - **PARAM_LINEAR_MOTION_DAMPING** = **7** --- The amount of damping inside the slider limits.
  102. - **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = **8** --- A factor applied to the movement across axes orthogonal to the slider.
  103. - **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = **9** --- The amount of restitution when movement is across axes orthogonal to the slider.
  104. - **PARAM_LINEAR_ORTHOGONAL_DAMPING** = **10** --- The amount of damping when movement is across axes orthogonal to the slider.
  105. - **PARAM_ANGULAR_LIMIT_UPPER** = **11** --- The upper limit of rotation in the slider.
  106. - **PARAM_ANGULAR_LIMIT_LOWER** = **12** --- The lower limit of rotation in the slider.
  107. - **PARAM_ANGULAR_LIMIT_SOFTNESS** = **13** --- A factor applied to the all rotation once the limit is surpassed.
  108. - **PARAM_ANGULAR_LIMIT_RESTITUTION** = **14** --- The amount of restitution of the rotation when the limit is surpassed.
  109. - **PARAM_ANGULAR_LIMIT_DAMPING** = **15** --- The amount of damping of the rotation when the limit is surpassed.
  110. - **PARAM_ANGULAR_MOTION_SOFTNESS** = **16** --- A factor applied to the all rotation in the limits.
  111. - **PARAM_ANGULAR_MOTION_RESTITUTION** = **17** --- The amount of restitution of the rotation in the limits.
  112. - **PARAM_ANGULAR_MOTION_DAMPING** = **18** --- The amount of damping of the rotation in the limits.
  113. - **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** --- A factor applied to the all rotation across axes orthogonal to the slider.
  114. - **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** --- The amount of restitution of the rotation across axes orthogonal to the slider.
  115. - **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider.
  116. - **PARAM_MAX** = **22** --- Represents the size of the :ref:`Param<enum_SliderJoint_Param>` enum.
  117. Description
  118. -----------
  119. Slides across the X axis of the pivot object.
  120. Property Descriptions
  121. ---------------------
  122. .. _class_SliderJoint_property_angular_limit/damping:
  123. - :ref:`float<class_float>` **angular_limit/damping**
  124. +-----------+------------------+
  125. | *Default* | 0.0 |
  126. +-----------+------------------+
  127. | *Setter* | set_param(value) |
  128. +-----------+------------------+
  129. | *Getter* | get_param() |
  130. +-----------+------------------+
  131. The amount of damping of the rotation when the limit is surpassed.
  132. A lower damping value allows a rotation initiated by body A to travel to body B slower.
  133. .. _class_SliderJoint_property_angular_limit/lower_angle:
  134. - :ref:`float<class_float>` **angular_limit/lower_angle**
  135. +-----------+-----+
  136. | *Default* | 0.0 |
  137. +-----------+-----+
  138. The lower limit of rotation in the slider.
  139. .. _class_SliderJoint_property_angular_limit/restitution:
  140. - :ref:`float<class_float>` **angular_limit/restitution**
  141. +-----------+------------------+
  142. | *Default* | 0.7 |
  143. +-----------+------------------+
  144. | *Setter* | set_param(value) |
  145. +-----------+------------------+
  146. | *Getter* | get_param() |
  147. +-----------+------------------+
  148. The amount of restitution of the rotation when the limit is surpassed.
  149. Does not affect damping.
  150. .. _class_SliderJoint_property_angular_limit/softness:
  151. - :ref:`float<class_float>` **angular_limit/softness**
  152. +-----------+------------------+
  153. | *Default* | 1.0 |
  154. +-----------+------------------+
  155. | *Setter* | set_param(value) |
  156. +-----------+------------------+
  157. | *Getter* | get_param() |
  158. +-----------+------------------+
  159. A factor applied to the all rotation once the limit is surpassed.
  160. Makes all rotation slower when between 0 and 1.
  161. .. _class_SliderJoint_property_angular_limit/upper_angle:
  162. - :ref:`float<class_float>` **angular_limit/upper_angle**
  163. +-----------+-----+
  164. | *Default* | 0.0 |
  165. +-----------+-----+
  166. The upper limit of rotation in the slider.
  167. .. _class_SliderJoint_property_angular_motion/damping:
  168. - :ref:`float<class_float>` **angular_motion/damping**
  169. +-----------+------------------+
  170. | *Default* | 1.0 |
  171. +-----------+------------------+
  172. | *Setter* | set_param(value) |
  173. +-----------+------------------+
  174. | *Getter* | get_param() |
  175. +-----------+------------------+
  176. The amount of damping of the rotation in the limits.
  177. .. _class_SliderJoint_property_angular_motion/restitution:
  178. - :ref:`float<class_float>` **angular_motion/restitution**
  179. +-----------+------------------+
  180. | *Default* | 0.7 |
  181. +-----------+------------------+
  182. | *Setter* | set_param(value) |
  183. +-----------+------------------+
  184. | *Getter* | get_param() |
  185. +-----------+------------------+
  186. The amount of restitution of the rotation in the limits.
  187. .. _class_SliderJoint_property_angular_motion/softness:
  188. - :ref:`float<class_float>` **angular_motion/softness**
  189. +-----------+------------------+
  190. | *Default* | 1.0 |
  191. +-----------+------------------+
  192. | *Setter* | set_param(value) |
  193. +-----------+------------------+
  194. | *Getter* | get_param() |
  195. +-----------+------------------+
  196. A factor applied to the all rotation in the limits.
  197. .. _class_SliderJoint_property_angular_ortho/damping:
  198. - :ref:`float<class_float>` **angular_ortho/damping**
  199. +-----------+------------------+
  200. | *Default* | 1.0 |
  201. +-----------+------------------+
  202. | *Setter* | set_param(value) |
  203. +-----------+------------------+
  204. | *Getter* | get_param() |
  205. +-----------+------------------+
  206. The amount of damping of the rotation across axes orthogonal to the slider.
  207. .. _class_SliderJoint_property_angular_ortho/restitution:
  208. - :ref:`float<class_float>` **angular_ortho/restitution**
  209. +-----------+------------------+
  210. | *Default* | 0.7 |
  211. +-----------+------------------+
  212. | *Setter* | set_param(value) |
  213. +-----------+------------------+
  214. | *Getter* | get_param() |
  215. +-----------+------------------+
  216. The amount of restitution of the rotation across axes orthogonal to the slider.
  217. .. _class_SliderJoint_property_angular_ortho/softness:
  218. - :ref:`float<class_float>` **angular_ortho/softness**
  219. +-----------+------------------+
  220. | *Default* | 1.0 |
  221. +-----------+------------------+
  222. | *Setter* | set_param(value) |
  223. +-----------+------------------+
  224. | *Getter* | get_param() |
  225. +-----------+------------------+
  226. A factor applied to the all rotation across axes orthogonal to the slider.
  227. .. _class_SliderJoint_property_linear_limit/damping:
  228. - :ref:`float<class_float>` **linear_limit/damping**
  229. +-----------+------------------+
  230. | *Default* | 1.0 |
  231. +-----------+------------------+
  232. | *Setter* | set_param(value) |
  233. +-----------+------------------+
  234. | *Getter* | get_param() |
  235. +-----------+------------------+
  236. The amount of damping that happens once the limit defined by :ref:`linear_limit/lower_distance<class_SliderJoint_property_linear_limit/lower_distance>` and :ref:`linear_limit/upper_distance<class_SliderJoint_property_linear_limit/upper_distance>` is surpassed.
  237. .. _class_SliderJoint_property_linear_limit/lower_distance:
  238. - :ref:`float<class_float>` **linear_limit/lower_distance**
  239. +-----------+------------------+
  240. | *Default* | -1.0 |
  241. +-----------+------------------+
  242. | *Setter* | set_param(value) |
  243. +-----------+------------------+
  244. | *Getter* | get_param() |
  245. +-----------+------------------+
  246. The minimum difference between the pivot points on their X axis before damping happens.
  247. .. _class_SliderJoint_property_linear_limit/restitution:
  248. - :ref:`float<class_float>` **linear_limit/restitution**
  249. +-----------+------------------+
  250. | *Default* | 0.7 |
  251. +-----------+------------------+
  252. | *Setter* | set_param(value) |
  253. +-----------+------------------+
  254. | *Getter* | get_param() |
  255. +-----------+------------------+
  256. The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost.
  257. .. _class_SliderJoint_property_linear_limit/softness:
  258. - :ref:`float<class_float>` **linear_limit/softness**
  259. +-----------+------------------+
  260. | *Default* | 1.0 |
  261. +-----------+------------------+
  262. | *Setter* | set_param(value) |
  263. +-----------+------------------+
  264. | *Getter* | get_param() |
  265. +-----------+------------------+
  266. A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement.
  267. .. _class_SliderJoint_property_linear_limit/upper_distance:
  268. - :ref:`float<class_float>` **linear_limit/upper_distance**
  269. +-----------+------------------+
  270. | *Default* | 1.0 |
  271. +-----------+------------------+
  272. | *Setter* | set_param(value) |
  273. +-----------+------------------+
  274. | *Getter* | get_param() |
  275. +-----------+------------------+
  276. The maximum difference between the pivot points on their X axis before damping happens.
  277. .. _class_SliderJoint_property_linear_motion/damping:
  278. - :ref:`float<class_float>` **linear_motion/damping**
  279. +-----------+------------------+
  280. | *Default* | 0.0 |
  281. +-----------+------------------+
  282. | *Setter* | set_param(value) |
  283. +-----------+------------------+
  284. | *Getter* | get_param() |
  285. +-----------+------------------+
  286. The amount of damping inside the slider limits.
  287. .. _class_SliderJoint_property_linear_motion/restitution:
  288. - :ref:`float<class_float>` **linear_motion/restitution**
  289. +-----------+------------------+
  290. | *Default* | 0.7 |
  291. +-----------+------------------+
  292. | *Setter* | set_param(value) |
  293. +-----------+------------------+
  294. | *Getter* | get_param() |
  295. +-----------+------------------+
  296. The amount of restitution inside the slider limits.
  297. .. _class_SliderJoint_property_linear_motion/softness:
  298. - :ref:`float<class_float>` **linear_motion/softness**
  299. +-----------+------------------+
  300. | *Default* | 1.0 |
  301. +-----------+------------------+
  302. | *Setter* | set_param(value) |
  303. +-----------+------------------+
  304. | *Getter* | get_param() |
  305. +-----------+------------------+
  306. A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement.
  307. .. _class_SliderJoint_property_linear_ortho/damping:
  308. - :ref:`float<class_float>` **linear_ortho/damping**
  309. +-----------+------------------+
  310. | *Default* | 1.0 |
  311. +-----------+------------------+
  312. | *Setter* | set_param(value) |
  313. +-----------+------------------+
  314. | *Getter* | get_param() |
  315. +-----------+------------------+
  316. The amount of damping when movement is across axes orthogonal to the slider.
  317. .. _class_SliderJoint_property_linear_ortho/restitution:
  318. - :ref:`float<class_float>` **linear_ortho/restitution**
  319. +-----------+------------------+
  320. | *Default* | 0.7 |
  321. +-----------+------------------+
  322. | *Setter* | set_param(value) |
  323. +-----------+------------------+
  324. | *Getter* | get_param() |
  325. +-----------+------------------+
  326. The amount of restitution when movement is across axes orthogonal to the slider.
  327. .. _class_SliderJoint_property_linear_ortho/softness:
  328. - :ref:`float<class_float>` **linear_ortho/softness**
  329. +-----------+------------------+
  330. | *Default* | 1.0 |
  331. +-----------+------------------+
  332. | *Setter* | set_param(value) |
  333. +-----------+------------------+
  334. | *Getter* | get_param() |
  335. +-----------+------------------+
  336. A factor applied to the movement across axes orthogonal to the slider.
  337. Method Descriptions
  338. -------------------
  339. .. _class_SliderJoint_method_get_param:
  340. - :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint_Param>` param **)** const
  341. .. _class_SliderJoint_method_set_param:
  342. - void **set_param** **(** :ref:`Param<enum_SliderJoint_Param>` param, :ref:`float<class_float>` value **)**