123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GrooveJoint2D.xml.
- .. _class_GrooveJoint2D:
- GrooveJoint2D
- =============
- **Inherits:** :ref:`Joint2D<class_Joint2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- Groove constraint for 2D physics.
- Description
- -----------
- Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another.
- Properties
- ----------
- +---------------------------+--------------------------------------------------------------------+----------+
- | :ref:`float<class_float>` | :ref:`initial_offset<class_GrooveJoint2D_property_initial_offset>` | ``25.0`` |
- +---------------------------+--------------------------------------------------------------------+----------+
- | :ref:`float<class_float>` | :ref:`length<class_GrooveJoint2D_property_length>` | ``50.0`` |
- +---------------------------+--------------------------------------------------------------------+----------+
- Property Descriptions
- ---------------------
- .. _class_GrooveJoint2D_property_initial_offset:
- - :ref:`float<class_float>` **initial_offset**
- +-----------+---------------------------+
- | *Default* | ``25.0`` |
- +-----------+---------------------------+
- | *Setter* | set_initial_offset(value) |
- +-----------+---------------------------+
- | *Getter* | get_initial_offset() |
- +-----------+---------------------------+
- The body B's initial anchor position defined by the joint's origin and a local offset :ref:`initial_offset<class_GrooveJoint2D_property_initial_offset>` along the joint's Y axis (along the groove).
- ----
- .. _class_GrooveJoint2D_property_length:
- - :ref:`float<class_float>` **length**
- +-----------+-------------------+
- | *Default* | ``50.0`` |
- +-----------+-------------------+
- | *Setter* | set_length(value) |
- +-----------+-------------------+
- | *Getter* | get_length() |
- +-----------+-------------------+
- The groove's length. The groove is from the joint's origin towards :ref:`length<class_GrooveJoint2D_property_length>` along the joint's local Y axis.
- .. |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.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|