pandemonium_engine_docs/classes/class_sliderjoint.rst

546 lines
22 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/SliderJoint.xml.
.. _class_SliderJoint:
SliderJoint
===========
**Inherits:** :ref:`Joint<class_Joint>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Slider between two PhysicsBodies in 3D.
Description
-----------
Slides across the X axis of the pivot object. See also :ref:`Generic6DOFJoint<class_Generic6DOFJoint>`.
Properties
----------
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_limit/damping<class_SliderJoint_property_angular_limit/damping>` | ``0.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_limit/lower_angle<class_SliderJoint_property_angular_limit/lower_angle>` | ``0.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_limit/restitution<class_SliderJoint_property_angular_limit/restitution>` | ``0.7`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_limit/softness<class_SliderJoint_property_angular_limit/softness>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_limit/upper_angle<class_SliderJoint_property_angular_limit/upper_angle>` | ``0.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_motion/damping<class_SliderJoint_property_angular_motion/damping>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_motion/restitution<class_SliderJoint_property_angular_motion/restitution>` | ``0.7`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_motion/softness<class_SliderJoint_property_angular_motion/softness>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_ortho/damping<class_SliderJoint_property_angular_ortho/damping>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_ortho/restitution<class_SliderJoint_property_angular_ortho/restitution>` | ``0.7`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`angular_ortho/softness<class_SliderJoint_property_angular_ortho/softness>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_limit/damping<class_SliderJoint_property_linear_limit/damping>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_limit/lower_distance<class_SliderJoint_property_linear_limit/lower_distance>` | ``-1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_limit/restitution<class_SliderJoint_property_linear_limit/restitution>` | ``0.7`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_limit/softness<class_SliderJoint_property_linear_limit/softness>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_limit/upper_distance<class_SliderJoint_property_linear_limit/upper_distance>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_motion/damping<class_SliderJoint_property_linear_motion/damping>` | ``0.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_motion/restitution<class_SliderJoint_property_linear_motion/restitution>` | ``0.7`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_motion/softness<class_SliderJoint_property_linear_motion/softness>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_ortho/damping<class_SliderJoint_property_linear_ortho/damping>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_ortho/restitution<class_SliderJoint_property_linear_ortho/restitution>` | ``0.7`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
| :ref:`float<class_float>` | :ref:`linear_ortho/softness<class_SliderJoint_property_linear_ortho/softness>` | ``1.0`` |
+---------------------------+--------------------------------------------------------------------------------------------+----------+
Methods
-------
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_param<class_SliderJoint_method_get_param>` **(** :ref:`Param<enum_SliderJoint_Param>` param **)** |const| |
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_param<class_SliderJoint_method_set_param>` **(** :ref:`Param<enum_SliderJoint_Param>` param, :ref:`float<class_float>` value **)** |
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+
Enumerations
------------
.. _enum_SliderJoint_Param:
.. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_UPPER:
.. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_LOWER:
.. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_SOFTNESS:
.. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_RESTITUTION:
.. _class_SliderJoint_constant_PARAM_LINEAR_LIMIT_DAMPING:
.. _class_SliderJoint_constant_PARAM_LINEAR_MOTION_SOFTNESS:
.. _class_SliderJoint_constant_PARAM_LINEAR_MOTION_RESTITUTION:
.. _class_SliderJoint_constant_PARAM_LINEAR_MOTION_DAMPING:
.. _class_SliderJoint_constant_PARAM_LINEAR_ORTHOGONAL_SOFTNESS:
.. _class_SliderJoint_constant_PARAM_LINEAR_ORTHOGONAL_RESTITUTION:
.. _class_SliderJoint_constant_PARAM_LINEAR_ORTHOGONAL_DAMPING:
.. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_UPPER:
.. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_LOWER:
.. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_SOFTNESS:
.. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_RESTITUTION:
.. _class_SliderJoint_constant_PARAM_ANGULAR_LIMIT_DAMPING:
.. _class_SliderJoint_constant_PARAM_ANGULAR_MOTION_SOFTNESS:
.. _class_SliderJoint_constant_PARAM_ANGULAR_MOTION_RESTITUTION:
.. _class_SliderJoint_constant_PARAM_ANGULAR_MOTION_DAMPING:
.. _class_SliderJoint_constant_PARAM_ANGULAR_ORTHOGONAL_SOFTNESS:
.. _class_SliderJoint_constant_PARAM_ANGULAR_ORTHOGONAL_RESTITUTION:
.. _class_SliderJoint_constant_PARAM_ANGULAR_ORTHOGONAL_DAMPING:
.. _class_SliderJoint_constant_PARAM_MAX:
enum **Param**:
- **PARAM_LINEAR_LIMIT_UPPER** = **0** --- The maximum difference between the pivot points on their X axis before damping happens.
- **PARAM_LINEAR_LIMIT_LOWER** = **1** --- The minimum difference between the pivot points on their X axis before damping happens.
- **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.
- **PARAM_LINEAR_LIMIT_RESTITUTION** = **3** --- The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost.
- **PARAM_LINEAR_LIMIT_DAMPING** = **4** --- The amount of damping once the slider limits are surpassed.
- **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.
- **PARAM_LINEAR_MOTION_RESTITUTION** = **6** --- The amount of restitution inside the slider limits.
- **PARAM_LINEAR_MOTION_DAMPING** = **7** --- The amount of damping inside the slider limits.
- **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = **8** --- A factor applied to the movement across axes orthogonal to the slider.
- **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = **9** --- The amount of restitution when movement is across axes orthogonal to the slider.
- **PARAM_LINEAR_ORTHOGONAL_DAMPING** = **10** --- The amount of damping when movement is across axes orthogonal to the slider.
- **PARAM_ANGULAR_LIMIT_UPPER** = **11** --- The upper limit of rotation in the slider.
- **PARAM_ANGULAR_LIMIT_LOWER** = **12** --- The lower limit of rotation in the slider.
- **PARAM_ANGULAR_LIMIT_SOFTNESS** = **13** --- A factor applied to the all rotation once the limit is surpassed.
- **PARAM_ANGULAR_LIMIT_RESTITUTION** = **14** --- The amount of restitution of the rotation when the limit is surpassed.
- **PARAM_ANGULAR_LIMIT_DAMPING** = **15** --- The amount of damping of the rotation when the limit is surpassed.
- **PARAM_ANGULAR_MOTION_SOFTNESS** = **16** --- A factor applied to the all rotation in the limits.
- **PARAM_ANGULAR_MOTION_RESTITUTION** = **17** --- The amount of restitution of the rotation in the limits.
- **PARAM_ANGULAR_MOTION_DAMPING** = **18** --- The amount of damping of the rotation in the limits.
- **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = **19** --- A factor applied to the all rotation across axes orthogonal to the slider.
- **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = **20** --- The amount of restitution of the rotation across axes orthogonal to the slider.
- **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = **21** --- The amount of damping of the rotation across axes orthogonal to the slider.
- **PARAM_MAX** = **22** --- Represents the size of the :ref:`Param<enum_SliderJoint_Param>` enum.
Property Descriptions
---------------------
.. _class_SliderJoint_property_angular_limit/damping:
- :ref:`float<class_float>` **angular_limit/damping**
+-----------+------------------+
| *Default* | ``0.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of damping of the rotation when the limit is surpassed.
A lower damping value allows a rotation initiated by body A to travel to body B slower.
----
.. _class_SliderJoint_property_angular_limit/lower_angle:
- :ref:`float<class_float>` **angular_limit/lower_angle**
+-----------+---------+
| *Default* | ``0.0`` |
+-----------+---------+
The lower limit of rotation in the slider.
----
.. _class_SliderJoint_property_angular_limit/restitution:
- :ref:`float<class_float>` **angular_limit/restitution**
+-----------+------------------+
| *Default* | ``0.7`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of restitution of the rotation when the limit is surpassed.
Does not affect damping.
----
.. _class_SliderJoint_property_angular_limit/softness:
- :ref:`float<class_float>` **angular_limit/softness**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
A factor applied to the all rotation once the limit is surpassed.
Makes all rotation slower when between 0 and 1.
----
.. _class_SliderJoint_property_angular_limit/upper_angle:
- :ref:`float<class_float>` **angular_limit/upper_angle**
+-----------+---------+
| *Default* | ``0.0`` |
+-----------+---------+
The upper limit of rotation in the slider.
----
.. _class_SliderJoint_property_angular_motion/damping:
- :ref:`float<class_float>` **angular_motion/damping**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of damping of the rotation in the limits.
----
.. _class_SliderJoint_property_angular_motion/restitution:
- :ref:`float<class_float>` **angular_motion/restitution**
+-----------+------------------+
| *Default* | ``0.7`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of restitution of the rotation in the limits.
----
.. _class_SliderJoint_property_angular_motion/softness:
- :ref:`float<class_float>` **angular_motion/softness**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
A factor applied to the all rotation in the limits.
----
.. _class_SliderJoint_property_angular_ortho/damping:
- :ref:`float<class_float>` **angular_ortho/damping**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of damping of the rotation across axes orthogonal to the slider.
----
.. _class_SliderJoint_property_angular_ortho/restitution:
- :ref:`float<class_float>` **angular_ortho/restitution**
+-----------+------------------+
| *Default* | ``0.7`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of restitution of the rotation across axes orthogonal to the slider.
----
.. _class_SliderJoint_property_angular_ortho/softness:
- :ref:`float<class_float>` **angular_ortho/softness**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
A factor applied to the all rotation across axes orthogonal to the slider.
----
.. _class_SliderJoint_property_linear_limit/damping:
- :ref:`float<class_float>` **linear_limit/damping**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
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.
----
.. _class_SliderJoint_property_linear_limit/lower_distance:
- :ref:`float<class_float>` **linear_limit/lower_distance**
+-----------+------------------+
| *Default* | ``-1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The minimum difference between the pivot points on their X axis before damping happens.
----
.. _class_SliderJoint_property_linear_limit/restitution:
- :ref:`float<class_float>` **linear_limit/restitution**
+-----------+------------------+
| *Default* | ``0.7`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost.
----
.. _class_SliderJoint_property_linear_limit/softness:
- :ref:`float<class_float>` **linear_limit/softness**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement.
----
.. _class_SliderJoint_property_linear_limit/upper_distance:
- :ref:`float<class_float>` **linear_limit/upper_distance**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The maximum difference between the pivot points on their X axis before damping happens.
----
.. _class_SliderJoint_property_linear_motion/damping:
- :ref:`float<class_float>` **linear_motion/damping**
+-----------+------------------+
| *Default* | ``0.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of damping inside the slider limits.
----
.. _class_SliderJoint_property_linear_motion/restitution:
- :ref:`float<class_float>` **linear_motion/restitution**
+-----------+------------------+
| *Default* | ``0.7`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of restitution inside the slider limits.
----
.. _class_SliderJoint_property_linear_motion/softness:
- :ref:`float<class_float>` **linear_motion/softness**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
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.
----
.. _class_SliderJoint_property_linear_ortho/damping:
- :ref:`float<class_float>` **linear_ortho/damping**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of damping when movement is across axes orthogonal to the slider.
----
.. _class_SliderJoint_property_linear_ortho/restitution:
- :ref:`float<class_float>` **linear_ortho/restitution**
+-----------+------------------+
| *Default* | ``0.7`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
The amount of restitution when movement is across axes orthogonal to the slider.
----
.. _class_SliderJoint_property_linear_ortho/softness:
- :ref:`float<class_float>` **linear_ortho/softness**
+-----------+------------------+
| *Default* | ``1.0`` |
+-----------+------------------+
| *Setter* | set_param(value) |
+-----------+------------------+
| *Getter* | get_param() |
+-----------+------------------+
A factor applied to the movement across axes orthogonal to the slider.
Method Descriptions
-------------------
.. _class_SliderJoint_method_get_param:
- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint_Param>` param **)** |const|
----
.. _class_SliderJoint_method_set_param:
- void **set_param** **(** :ref:`Param<enum_SliderJoint_Param>` param, :ref:`float<class_float>` value **)**
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`