12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
- .. _class_LineShape2D:
- LineShape2D
- ===========
- **Inherits:** :ref:`Shape2D<class_shape2d>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
- **Category:** Core
- Brief Description
- -----------------
- Line shape for 2D collision objects.
- Member Functions
- ----------------
- +--------------------------------+----------------------------------------------------------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`get_d<class_LineShape2D_get_d>` **(** **)** const |
- +--------------------------------+----------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_vector2>` | :ref:`get_normal<class_LineShape2D_get_normal>` **(** **)** const |
- +--------------------------------+----------------------------------------------------------------------------------------------------+
- | void | :ref:`set_d<class_LineShape2D_set_d>` **(** :ref:`float<class_float>` d **)** |
- +--------------------------------+----------------------------------------------------------------------------------------------------+
- | void | :ref:`set_normal<class_LineShape2D_set_normal>` **(** :ref:`Vector2<class_vector2>` normal **)** |
- +--------------------------------+----------------------------------------------------------------------------------------------------+
- Description
- -----------
- Line shape for 2D collision objects. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.
- Member Function Description
- ---------------------------
- .. _class_LineShape2D_get_d:
- - :ref:`float<class_float>` **get_d** **(** **)** const
- Return the line distance from the origin.
- .. _class_LineShape2D_get_normal:
- - :ref:`Vector2<class_vector2>` **get_normal** **(** **)** const
- Return the line normal.
- .. _class_LineShape2D_set_d:
- - void **set_d** **(** :ref:`float<class_float>` d **)**
- Set the line distance from the origin.
- .. _class_LineShape2D_set_normal:
- - void **set_normal** **(** :ref:`Vector2<class_vector2>` normal **)**
- Set the line normal.
|