: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/RibbonTrailMesh.xml. .. _class_RibbonTrailMesh: RibbonTrailMesh =============== **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Represents a straight ribbon-shaped :ref:`PrimitiveMesh` with variable width. .. rst-class:: classref-introduction-group Description ----------- **RibbonTrailMesh** represents a straight ribbon-shaped mesh with variable width. The ribbon is composed of a number of flat or cross-shaped sections, each with the same :ref:`section_length` and number of :ref:`section_segments`. A :ref:`curve` is sampled along the total length of the ribbon, meaning that the curve determines the size of the ribbon along its length. This primitive mesh is usually used for particle trails. .. rst-class:: classref-introduction-group Tutorials --------- - :doc:`3D Particle trails <../tutorials/3d/particles/trails>` - :doc:`Particle systems (3D) <../tutorials/3d/particles/index>` .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +------------------------------------------+--------------------------------------------------------------------------+---------+ | :ref:`Curve` | :ref:`curve` | | +------------------------------------------+--------------------------------------------------------------------------+---------+ | :ref:`float` | :ref:`section_length` | ``0.2`` | +------------------------------------------+--------------------------------------------------------------------------+---------+ | :ref:`int` | :ref:`section_segments` | ``3`` | +------------------------------------------+--------------------------------------------------------------------------+---------+ | :ref:`int` | :ref:`sections` | ``5`` | +------------------------------------------+--------------------------------------------------------------------------+---------+ | :ref:`Shape` | :ref:`shape` | ``1`` | +------------------------------------------+--------------------------------------------------------------------------+---------+ | :ref:`float` | :ref:`size` | ``1.0`` | +------------------------------------------+--------------------------------------------------------------------------+---------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_RibbonTrailMesh_Shape: .. rst-class:: classref-enumeration enum **Shape**: :ref:`🔗` .. _class_RibbonTrailMesh_constant_SHAPE_FLAT: .. rst-class:: classref-enumeration-constant :ref:`Shape` **SHAPE_FLAT** = ``0`` Gives the mesh a single flat face. .. _class_RibbonTrailMesh_constant_SHAPE_CROSS: .. rst-class:: classref-enumeration-constant :ref:`Shape` **SHAPE_CROSS** = ``1`` Gives the mesh two perpendicular flat faces, making a cross shape. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_RibbonTrailMesh_property_curve: .. rst-class:: classref-property :ref:`Curve` **curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_curve**\ (\ ) Determines the size of the ribbon along its length. The size of a particular section segment is obtained by multiplying the baseline :ref:`size` by the value of this curve at the given distance. For values smaller than ``0``, the faces will be inverted. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator ---- .. _class_RibbonTrailMesh_property_section_length: .. rst-class:: classref-property :ref:`float` **section_length** = ``0.2`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_section_length**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_section_length**\ (\ ) The length of a section of the ribbon. .. rst-class:: classref-item-separator ---- .. _class_RibbonTrailMesh_property_section_segments: .. rst-class:: classref-property :ref:`int` **section_segments** = ``3`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_section_segments**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_section_segments**\ (\ ) The number of segments in a section. The :ref:`curve` is sampled on each segment to determine its size. Higher values result in a more detailed ribbon at the cost of performance. .. rst-class:: classref-item-separator ---- .. _class_RibbonTrailMesh_property_sections: .. rst-class:: classref-property :ref:`int` **sections** = ``5`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_sections**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_sections**\ (\ ) The total number of sections on the ribbon. .. rst-class:: classref-item-separator ---- .. _class_RibbonTrailMesh_property_shape: .. rst-class:: classref-property :ref:`Shape` **shape** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_shape**\ (\ value\: :ref:`Shape`\ ) - :ref:`Shape` **get_shape**\ (\ ) Determines the shape of the ribbon. .. rst-class:: classref-item-separator ---- .. _class_RibbonTrailMesh_property_size: .. rst-class:: classref-property :ref:`float` **size** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_size**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_size**\ (\ ) The baseline size of the ribbon. The size of a particular section segment is obtained by multiplying this size by the value of the :ref:`curve` at the given distance. .. |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.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`