.. 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` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Line shape for 2D collision objects. Member Functions ---------------- +--------------------------------+----------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_d` **(** **)** const | +--------------------------------+----------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_normal` **(** **)** const | +--------------------------------+----------------------------------------------------------------------------------------------------+ | void | :ref:`set_d` **(** :ref:`float` d **)** | +--------------------------------+----------------------------------------------------------------------------------------------------+ | void | :ref:`set_normal` **(** :ref:`Vector2` normal **)** | +--------------------------------+----------------------------------------------------------------------------------------------------+ Member Variables ---------------- - :ref:`float` **d** - :ref:`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` **get_d** **(** **)** const Return the line distance from the origin. .. _class_LineShape2D_get_normal: - :ref:`Vector2` **get_normal** **(** **)** const Return the line normal. .. _class_LineShape2D_set_d: - void **set_d** **(** :ref:`float` d **)** Set the line distance from the origin. .. _class_LineShape2D_set_normal: - void **set_normal** **(** :ref:`Vector2` normal **)** Set the line normal.